代码如下
# Cristmas Quiz
import time
from time import *
score = 1
quiz_q = [
'how many turtle doves',
'how many French Hens',
'how many gold rings',
'how many Lords a leaping?'
]
quiz_a = [2,3,5,10]
for n in range(4):
question = input(print(quiz_q[n]))
if quiz_a[n] == question:
score += 1
else:
print("your score was ",score-1)
time.sleep(5)
quit()
返回:
how many turtle doves
None
我环顾四周,但所有其他的qustion似乎都在引用函数和return vs print()的使用
任何帮助将不胜感激