我想在for循环中打印出一个句子,其中为每个不同的情况打印出不同的句子迭代,即我有两个不同的列表:student_result_reading和student_name
student_result_reading = []
student_name = []
while True:
student_name_enter = input("Please enter student name: ")
student_name.append(student_name_enter)
student_enter = int(input("Please enter student result between 0 - 100%: "))
student_result_reading.append(student_enter)
continueask = input("Would you like to enter someone else? ")
if continueask == "yes":
continue
else:
break
for studread,studentname in student_result_reading,student_name:
print("Student Name: {} | Test Name: Reading Test | Percentage score: {}".format(studentname,studread))
这是我的两个问题:
>当我输入2个或更多名称时,它们的格式不正确.
>当我输入1个名字时,我收到一个错误.
任何解决方案的任何帮助表示赞赏.