我正在制作一个测验程序,用户可以在测验中添加任意数量的问题,并且他们也可以参加测验。我只是不知道如何单独打印问题。
questionsList = []
rightAnswersList = []
choicesList = []
while True:
option = int(input("Add questions or take the quiz? 1 or 2 respectively: "))
if option == 1:
# adds a question to questionsList and choices to choicesList and answers to rightAnswersList
elif option == 2:
# prints question1 --> choices --> asks answer then it loops so question2 and its choices will now be printed
呼啦一阵风
相关分类