每当我运行代码时,input语句下的行永远不会运行:

2024-04-20 10:54:15 发布

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

我无法运行输入变量下的任何代码行。你知道吗

我查过有没有打字错误,但没有。你知道吗

def inputs():
    global guess, count
    count = (0)
    while len(theWord) > (count):
        for i in range(len(theWord)):
            print (theWord[i])
            print (count)
    **      guess = str(input("Guess a letter A-Z:").strip())**
    **      print ("test") <---- should run**
        if guess == theWord[i]:
        graphic[i] = (guess)
        print (graphic)
        count = count + (1) 

inputs()

Tags: 代码inforlendefcount错误range