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

最后編輯于
?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。

推薦閱讀更多精彩內容

  • **2014真題Directions:Read the following text. Choose the be...
    又是夜半驚坐起閱讀 9,890評論 0 23
  • 今天看了職來職往,非常靜距離,魯豫有約,天天向上,非誠勿擾,每個人都在為自己的命運打拼,可以說都在追夢的路上,on...
    燊兒閱讀 115評論 0 0
  • [TOC] 使用 systemd 中的定時器執行定時任務 https://linux.cn/article-399...
    codekissyoung閱讀 198評論 0 0