Python|Python codecademy student Becomes the Teacher 9.How is Everybody doing?
【Python|Python codecademy student Becomes the Teacher 9.How is Everybody doing?】1.最后,print out the result of calling get_class_average with your students list.Your students should be[lloyd,alice,tyler].
2.然后,print the result of get_letter_grade for the class's average.
students = [lloyd,alice,tyler]
results = []
def get_class_average(students):
for student in students:
results.append(get_average(student))
print get_class_average(results)
print get_letter_grade(get_class_average(results))
8.part of the whole
def get_class_average(students):
results = []
for student in students:
results.append(get_average(student))
return average(results)
1.定义get_class_average,变量students
2.空列表results
推荐阅读
- python学习之|python学习之 实现QQ自动发送消息
- 逻辑回归的理解与python示例
- python自定义封装带颜色的logging模块
- 【Leetcode/Python】001-Two|【Leetcode/Python】001-Two Sum
- Python基础|Python基础 - 练习1
- Python爬虫|Python爬虫 --- 1.4 正则表达式(re库)
- Python(pathlib模块)
- python青少年编程比赛_第十一届蓝桥杯大赛青少年创意编程组比赛细则
- Python数据分析(一)(Matplotlib使用)
- Python|Python 9.20