如果guess_count <guess_limit <语法错误,但我无法找出问题所在

时间:2019-06-08 23:19:23

标签: python

secret_word = "Lion"


guess = ""


guess = 0



guess_limit= 3



out_of_guesses = False


while guess != secret_word and not (out_of_guesses):


    if guess_count < guess_limit


            guess = input("Enter Guess: ")


            guessCount +=1
    else:


        out_of_guesses= True




if out_of_guesses:



    print("Out of guesses, YOU LOSE!")
else:






    print("You win")

1 个答案:

答案 0 :(得分:0)

您在if guess_count < guess_limit的末尾缺少一个冒号。