循环用户输入Python

时间:2018-01-18 08:04:14

标签: python python-3.x loops user-input

我想循环输入,所以我得到3个猜测,或2个猜测和1个线索:

if chosen == 1:
    print ("Your anagram is:", anagrameasy)
time.sleep(1)
easyguess = input ("Please input the answer in lower case, type clue for a clue")

if easyguess == answereasy:
    print ("correct")

     if easyguess == "clue":
        print (clueeasy)
        easyguess = input ("Please input the answer in lower case, type clue for a clue")

     elif easyguess != answereasy:
         print("try again")

0 个答案:

没有答案