python实验报告代写_programs作业代写、代做data课程作业、代写Python实验作业、Python编程设计作业调试...
programs作业代写、代做data课程作业、代写Python实验作业、Python编程设计作业调试
日期:2020-07-23 10:26
Lab 10
Objectives
? Practice with designing your own types with classes
? Practice with creating and using instances of a class (objects)
Getting started
1. Create a new file called lab10.py and open it in your Wing editor
2. Download the provided starter files: student.py and sample input files provided to the same
directory as lab10.py
3. Add documentation for the methods within student.py where it is missing. (ie. type hints and
docstring with purpose and examples)
4. Design the methods within student.py and functions within lab10.py according to
specifications below.
Submission
1. Upload student.py and lab10.py files in CourseSpaces before the deadline.
Grading…
Marks will be awarded for correctness, considering:
? the function signature matches the description given (has the name and arguments EXACTLY as
specified)
? the function has the expected behaviour
? a zero grade will be given for programs with incorrect filenames
? a zero grade will be given for programs who have errors or cannot run with Python 3
and for quality according to software engineering properties such as:
? program structure
o import statements are at the top of the file
o constants defined after import statements with CAPITAL LETTERS
o no test calls are left within the file (it only contains your function definitions)
? documentation
o type hints
o purpose
o examples
? meaningful variable names
? proper use of constants
? use of code constructs (functions, variables, condition statements) to
o eliminate redundant code and redundant computation
o make complex code easier to read
? testing coverage
o you have added an example to cover each boundary case within your program
Method/Function Specifications
Within student.py:
1. Design a method to compare equality of Student instances in student.py. When your
implementation is complete, when an instance of a Student is compared to another Student
using == it should evaluate to True if the sid values of the two Student instances are the same and
False otherwise. NOTE: the header must be exact for the overriding to work correctly. See lecture
examples for help.
2. Design a method called is_grade_above that takes as arguments a self-reference to the Student
instance (self) and an additional argument as a threshold grade. The method should determine
whether the grade of self is above the given threshold grade.
Within lab10.py:
1. Add the necessary imports to your file for testing, type hints and for you student class
2. Design a function called get_students that takes a name of a file and creates and returns a new
list of Students from data in filename where each line of file has a student id and grade separated by
a comma. If the file does not exist or the file is empty the function should return an empty list.
3. Design a function called get_classlist that takes a list of Student instances and creates and
returns a new list of just the student ids of all Student instances in the list.
4. Design a function called count_above that takes a list of Student instances and an additional
argument as a threshold grade. The function should return a count of the number of Student
instances in the list that have a grade above the given threshold grade.
5. Design a function called get_average_grade that takes a list of Student instances and an
additional argument as a threshold grade. The function should calculate and return the average grade
of all Student instances in the list as a floating point number. Your function should assume that the
list is not empty.
python实验报告代写_programs作业代写、代做data课程作业、代写Python实验作业、Python编程设计作业调试...相关推荐
- python程序设计作业_CS602留学生作业代做、代写Programming课程作业、代做Python语言作业、Python编程设计作业调试...
CS602留学生作业代做.代写Programming课程作业.代做Python语言作业.Python编程设计作业调试 日期:2019-12-06 10:50 CS602 - Data-Driven D ...
- python255多少钱_CS255留学生作业代做、代写Python语言作业、Timetabling作业代做、Python编程设计作业调试...
CS255留学生作业代做.代写Python语言作业.Timetabling作业代做.Python编程设计作业调试 日期:2019-11-11 11:08 CS255 Artificial Intell ...
- matlab留学生作业代做,25877留学生作业代做、代写MATLAB,R编程设计作业、代做MATLAB/R课程作业、代写portfolio作业...
25877留学生作业代做.代写MATLAB,R编程设计作业.代做MATLAB/R课程作业.代写portfolio作业 日期:2019-06-10 09:48 Financial Markets Ins ...
- 课程设计代写java,JAVA课程设计作业代做、代写JAVA编程设计作业、代写data留学生作业...
JAVA课程设计作业代做.代写JAVA编程设计作业.代写data留学生作业 日期:2020-06-13 11:30 JAVA Coursework (30 marks) Suppose you nee ...
- python编译2的n次方计算器_用PYTHON2做个计算器,哪位高手能用Python写出计算器的代码,需要加减乘除和退出,谢谢!...
匿名用户 1级 2018-06-05 回答 粗略的写了一个,没有包含对输入的检查. # coding: utf-8 ''' 计算器 ''' operator = { 'a': ['a for addi ...
- 3D游戏编程设计作业八
本次作业五选一,我选择制作血条预制设计,要求如下 血条(Health Bar)的预制设计.具体要求如下 分别使用 IMGUI 和 UGUI 实现 使用 UGUI,血条是游戏对象的一个子元素,任何时候需 ...
- HTML5期末大作业:基于html+css+javascript+jquery实现藏族文化15页【学生网页设计作业源码】
- python开发cs程序_CSE209代做、代写Computer Graphics、代做CS/python编程设计代写Python程序|代做Processing...
CSE209代做.代写Computer Graphics.代做CS/python编程设计代写Python程序|代做ProcessingCSE209 Computer Graphics~1~CSE209 ...
- python语言的实验心得体会范文_实验报告个人心得体会范文
实验报告个人心得体会范文 实验后的实验报告让我们有了总结回顾的效果.下面是 xx 整理的实验报告心得体会范文,以供大家阅读. 实验报告心得体会范文 ( 一 ) 这学期我们开设了计 算机网络技术实验课. ...
- python一个富翁试图与陌生人做一笔生意_VB实验报告一
<VB实验报告一>由会员分享,可在线阅读,更多相关<VB实验报告一(9页珍藏版)>请在人人文库网上搜索. 1.VB程序设计实验单元一实验报告专业班级: 姓名 学号 指导教师: ...
最新文章
- 大用户规模互联网架构发展
- Segment公司--整合数据进行分析
- SpringMVC介绍之Validation
- 读他:男人最怕听的十句话
- Android 应用开发---App 移动应用中九种导航设计总结及其优缺点分
- 王道机试指南读后总结-6(动态规划等)
- 前端学习与“IT界大佬告诉你,程序员接私活的7大平台利器”
- Linux IPC udp/ip socket 编程
- 滤波器: 滤波器设计软件
- PyCharm破解版 mac
- VUE对象的动态绑定
- 985硕士程序员年薪80万!邻居眼中不如一个老师?你怎么看?
- “博观而约取,厚积而薄发”——苏东坡
- YOLOv1的pytorch复现版本,博主亲自测试完整复现。
- VSCode Run code插件运行机制和配置文件的意思解释
- Arduino的数字信号、模拟信号以及串口整理
- Matlab pdepd函数偏微分方程的求解问题
- 鸿蒙智联生态产品《接入智慧生活App开发指导》(官方更新版)
- win2003 启动报错c0000135 this application has failed to start because csrsrv.dll was not found
- macOS如何给idea安装ja-netfilter插件