为了账号安全,请及时绑定邮箱和手机立即绑定

如果他们能够一次回答一个问题,如何给 5 分,但如果他们在第二次回答时使用

如果他们能够一次回答一个问题,如何给 5 分,但如果他们在第二次回答时使用

FFIVE 2021-07-15 18:13:15
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":    breakelse:    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:        breakquestion2 = "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":    breakelse:    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 分。任何帮助,将不胜感激。我仍然需要它来解决这两个问题。
查看完整描述

1 回答

  • 1 回答
  • 0 关注
  • 133 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信