print("Artist quiz")
question1 = "Who sang Perfect?"
options1 = "a.Myslef\nb. Papa\nc. Johhny\nd. Ed Sheeran\n"
print(question1)
print(options1)
while True:
response = input("Hit 'a', 'b', 'c' or 'd' for your answer\n")
if response == "d":
break
else:
print("Incorrect!!! Try again.")
while True:
response = input("Hit 'a', 'b', 'c' or 'd' for your answer\n")
if response == "d":
stop = True
break
else:
print("Incorrect!!! You ran out of your attempts")
stop = True
break
if stop:
break
question2 = "Who sang Umbrella?"
options2 = "a.Okie dokie\nb. Rhianna\nc. Shakira\nd. Beyonce\n"
print(question2)
print(options2)
while True:
response = input("Hit 'a', 'b', 'c' or 'd' for your answer\n")
if response == "b":
break
else:
print("Incorrect!!! Try again.")
while True:
response = input("Hit 'a', 'b', 'c' or 'd' for your answer\n")
if response == "b":
stop = True
break
else:print("Artist quiz")
这是我到目前为止所拥有的,但我想添加一个评分系统,一次尝试回答它是 5 分,但两次尝试回答它只有 3 分。任何帮助,将不胜感激。我仍然需要它来解决这两个问题。
相关分类