努力制定学习计划

2024-05-02 08:12:55 发布

您现在位置:Python中文网/ 问答频道 /正文

word = ["the us believed in a capitalist, democratic society with free elections and freedoms", "the ussr believed in a communist society, which is a one party state, with few personal freedoms and industry is owned by the country"]
put = ""
guess_no = 0
guess_limit = 3
no_ans_right = 0
win_2 = pyfiglet.figlet_format("Well done!! You got 2/2 !!")
noice = pyfiglet.figlet_format("Noice!")
word0_check = False
word1_check = False


print("  ")
print("~~~~~~~~~~~~~~~~~~~~~~")
print("  ")

while guess_no < guess_limit:
    print("|| What were the different ideologies? (Ideas about how to run a country) || ")
    put = input("Joelski@ans:~$ ").lower()
    print("  ")
    print("  ")
#############\
    if put == "skip":
        break
    if put == "ans":
        print(word)
#############/
    if put == word[0]:
        print(noice)
        word0_check == True
        no_ans_right += 1
        prog = pyfiglet.figlet_format(str(no_ans_right) + str(" / 2"))
        print(prog)

    if put == word[1]:
        print(noice)
        no_ans_right += 1
        word1_check == True
        prog = pyfiglet.figlet_format(str(no_ans_right) + str(" / 2"))
        print(prog)
    else:
        print("Nope")

    if (word0_check) and (word1_check):
        print(win_2)
        break

##*****这是我的问题区域(来自“if put==word[0]:”)

我正在努力使我的程序在激活(word0_检查)和(word1_检查)后(正确回答答案的每一部分)将中断到下一步

然而,我似乎不知道如何做到这一点。下一步我能试试什么


Tags: thenorightformatifputcheckword