我该如何添加功能?由于我们正在学习本章功能为我实现一个这个program.This是很重要的是到目前为止我的代码: 分数= []如何添加功能
def print_scores(copy_scores):
for i in range(len(copy_scores)):
print (copy_scores[i],)
scores = [75, 84, 66, 99, 51, 65]
print_scores (scores)
print()
while True:
scores = int(input("Please enter your score values"))
if scores == -99:
break
Sample output:
75, 84, 66, 99, 51, 65
P P P P F P
您需要具体说明您正在实施这些功能的问题。 – Barmar
我该如何打印分数以及用户是否通过使用函数或失败? –
提示:使用'scores.append()'将一些东西添加到'scores'列表中。读取输入时不要替换列表变量。并确保您获得正确的缩进。 – Barmar