代做DS2500、代写Python设计程序
Spring 2024
Python Grading Guidelines
In DS2500, you’ll have a project, labs, homeworks, and Python Practice Problems (PPPs) that all contribute to your grade. For some of this work, your grade will be entirely based on correctness, and for others your coding/visualization style will play a large role.
Correctness: Labs and PPPs
Labs and PPPs are auto-graded, and you receive full credit if the unit tests in the autograder pass. Make sure you verify the output of the autograder! For these assignments, you will be graded only on the correctness of your code and not on its style.
Correctness + Style: Homeworks and Projects
For projects and homeworks, your code will be reviewed by a DS2500 TA, and your grade will be based in large part on your coding style and visualizations.
Our highest priority is that your code be incredibly clear and easy to work with -- just as the expectation would be in a job or co-op.
In particular, we’ll grade your code based on its readability, modularity, and reusability. We expect your visualizations, including presentation slides, to be easy to follow. You will receive a score of excellent, satisfactory, in progress, or not met on all of these criteria.
Below, you’ll find a grading rubric that we’ll use for every homework and project. Additionally, we’ve included the DS2500 style guide for specific items around spacing, variable names, etc (it’s very similar to the DS2000 style guide!)
Coding + Visualization Grading Rubric
DS2500 Style Guide
Spacing
Variable and Function Names
Strings
Comments
Coding + Visualization Grading Rubric
Category Excellent Good In Progress Not Met
Readability Variable and function names are clear and concise. Code is consistently formatted and makes good use of horizontal and vertical space. No lines exceed 80 characters. All information printed out is readable and uses the appropriate data type and/or rounding. Minor issues with variable naming, formatting, printing, or spacing.
At least one significant issue with readability.
Multiple major issues with readability; code is extremely hard to follow.
Modularity Code is well-organized and split into functions, including a main function to initiate execution. Functions have no more than 30 lines each and are self-contained. Code is not repeated. Control structures (loops, conditionals) are used appropriately within functions. Minor issues with messy or long functions, or with repeated code. At least one significant issue with modularity such as too few functions or disorganized code. Functions not used besides main.
Reusability Code is consistently well-documented and every function has a descriptive block comment. All written code is used in execution. Implementations are efficient. Minor issues with comments, extra/missing code, or inefficiencies. At least one significant issue with reusability. Code could not be reused in another program.
Visualizations Visualizations are clear, easy to follow, and make good use of labels, legends, titles, sizes, and colors. Minor issues with missing tags or confusing/counterintuitive colors. Visualizations chosen are inappropriate for the data, or incorrect based on requirements of the assignment.. Visualizations not present.
DS2500 Style Guide
Spacing
●Group related code together, and use vertical space to separate chunks of code
●Limit your code to 80 columns or less.
●Put white space around operators, and after commas.
Do this (vertical space):
# here is a comment describing the next three lines of code,
# which are all related to each other
Code line 1
Code line 2
Code line 3
# here is a comment describing the next two lines, which are
# separate from the lines above
Code line 4
Code line 5
Do this (horizontal space):
x = y + 5
if x == y:
result = func(18, 19, "hello")
spam = long_function_name(var_one, var_two,
var_three, var_four)
a = 1 + 2 + 3 + 4
+ 5 + 6 + 7
Not this:
x=y+5
x=y + 5
x = y+5
if x==y:
Variable and Function Names
●Variable and function names must be short and descriptive.
●Use lowercase letters, and use underscores to separate words. Do not use camel case.
●Constants, whose values never change once initialized, should be uppercase
●Constants can be used/reference in main, but NOT in other functions. To ensure reusability, a function should get all its data via parameters and not assume any constants exist in the file. Constants are defined at the very top of your program, below your comments but above all your functions. All other variables must be local -- i.e., defined within a function.
Do this:
age = 44
birth_year = 1978
first_name = "Laney"
def compute_result()
FILENAME = "file.txt"
Not this:
a = 44
x = 1978
variableName = "Laney"
def FunctionOne()
PI = 3.1415
PI += 4
Strings
●You can use single or double quotes to enclose strings. It doesn’t matter which one, as long as you’re consistent within a program.
●It’s useful to use f-strings for printing variables, especially when you need special formatting (but f-strings are not required for ds2500).
●But, don’t use the % or + operators for printing; they’re old-fashioned!
●Strings are immutable, so we can’t directly modify a string once it’s been created. A string method will generally return a modified copy.
Do this:
print("Hello", name)
print(f"Hello {name}")
Not this:
print("Hello %s" %name)
print("Hello" + name)
Comments
●Before you write any code, put a block comment at the top of every program with your name, the course, the assignment, the date, and the name of the file.
●Comments explaining your code should appear throughout your program.
●Comments go above Python statements, not beside them.
●Put a space between the “#” and the comment.
●Function comments should be a docstring just under the function signature. Apart from this, your functions don’t generally need inline comments unless you’re doing something very complex that requires an explanation.
Do this:
# comment describing my code
python statement
# space after crosshatch
Not this:
python statement # comment describing my code
#no space after crosshatch
Functions should be concise; it’s best to keep them under 30 lines of code. Functions should also accept a limited number of parameters; five of them at the absolute max. Function comments should include the parameters and return type, and they should describe the what of a function as well. You can use bullet points to describe these items, or summarize them.
Do this:
def func(param):
"""
Parameters: a non-negative number
Returns: a float
Does: computes and returns the square root
of the given number
"""
Function code
Function code
def func(param):
"""
Given a non-negative integer, computes
and returns its square root.
"""
Function code
Function code
Not this:
def func(param):
"""
Parameters: a non-negative number
Returns: a float
Does: computes and returns the square root
of the given number
"""
# inline comment
Function code
# inline comment
Function code
请加QQ:99515681 邮箱:99515681@qq.com WX:codinghelp
- 在国际市场 没有WhatsApp拉群工具 就像是无剑之侠 这是每位海外营销专家的绝对利器
- 专家之选 WhatsApp拉群工具如何在业务中引领海外营销的感官变革
- 中囤律商信用管理有限公司:引领企业信用修复与ISO体系认证的新篇章
- Instagram引流爆粉营销工具,Ins群发工具,带你实现营销逆袭!
- 北京爱尔英智眼科医院范春雷为母子俩施眼外斜手术,眼病、心病都好了!
- instagram营销推广新方式!ins自动快速上粉营销软件
- WhatsApp源头机房出售协议号,ws群发必备工具推荐
- 在生意的旅程中 与客户分享的喜悦时刻 都是通过WhatsApp拉群工具创造的美好回忆
- 老杨第一次再度抓握住一瓶水,他由此产生了新的憧憬
- 星期零携三大产品线亮相HOTELEX上海展,覆盖植物基餐+饮场景
- 东方甄选又用一份不太理想的中报,给了投资者一顿暴击
- ins群发协议,每一条LINE消息都可能是下一笔交易的喜悦源泉
- 初学者变高手 她在全球范围内使用WhatsApp拉群工具 客户基数实现了200%的激增
- instagram低成本引流推广!Ins自动私信工具,Instagram营销软件推荐!
- 数字产品交易平台的革新力量
- 《热辣滚烫》掀起健康减脂潮流,植物基食品迎来“第二春”?
- WhatsApp营销软件,ws群发软件/ws协议号/ws劫持号/ws业务咨询大轩
- 数字营销中的目标受众WhatsApp筛选器-WhatsApp营销工具是我业务成功的启动器!
- 在国际舞台 你需要的不仅是勇气 还有一把WhatsApp拉群营销工具的金钥匙
- 外贸新星的成长之路 WhatsApp拉群工具为我解锁了业务的新奇门道
- 全方位Telegram代群发,从梦想到现实,通过Telegram工具实现了生意的喜悦变现
- 便捷Line代群发,助您迅速提升用户互动!
- instagram营销软件,欢迎联系天宇爆粉【TG:@cjhshk199937】
- ins群发助手,ins群发软件,ins群发工具精准爆粉联系天宇测试
- 市场智者的选择 WhatsApp工具 专业海外营销专家揭示市场趋势的独到智慧
- Telegram自动拉人进群营销软件,TG批量拉人工具,电报拉群利器
- 数字风暴 WhatsApp拉群新功能为何成为市场热门话题 我们的工具给你解密
- 转化巅峰 喜悦飞扬 WhatsApp拉群工具为你的销售数字添彩夺目
- Instagram营销群发软件,Ins一键群发工具,助你实现营销梦想!
- Instagram营销软件,ins自动私信工具推荐/ig最强引流工具
推荐
- 老杨第一次再度抓握住一瓶水,他由此产生了新的憧憬 瘫痪十四年后,老杨第一次再度抓握住一瓶水,他 科技
- 疫情期间 这个品牌实现了疯狂扩张 记得第一次喝瑞幸,还是2017年底去北京出差的 科技
- 升级的脉脉,正在以招聘业务铺开商业化版图 长久以来,求职信息流不对称、单向的信息传递 科技
- 全力打造中国“创业之都”名片,第十届中国创业者大会将在郑州召开 北京创业科创科技中心主办的第十届中国创业 科技
- 如何经营一家好企业,需要具备什么要素特点 我们大多数人刚开始创办一家企业都遇到经营 科技
- 智慧驱动 共创未来| 东芝硬盘创新数据存储技术 为期三天的第五届中国(昆明)南亚社会公共安 科技
- B站更新决策机构名单:共有 29 名掌权管理者,包括陈睿、徐逸、李旎、樊欣等人 1 月 15 日消息,据界面新闻,B站上周发布内部 科技
- 苹果罕见大降价,华为的压力给到了? 1、苹果官网罕见大降价冲上热搜。原因是苹 科技
- 丰田章男称未来依然需要内燃机 已经启动电动机新项目 尽管电动车在全球范围内持续崛起,但丰田章男 科技
- 创意驱动增长,Adobe护城河够深吗? Adobe通过其Creative Cloud订阅捆绑包具有 科技