小编Gil*_*man的帖子

TypeError:'int'对象不可调用,,, len()

我写了一个玩刽子手的程序---它还没有完成,但由于某些原因它给了我一个错误...

import turtle
n=False
y=True
list=()
print ("welcome to the hangman! you word is?")
word=raw_input()
len=len(word)
for x in range(70):
    print
print "_ "*len
while n==False:
    while y==True:
        print "insert a letter:"
        p=raw_input()
        leenghthp=len(p)
        if leengthp!=1:
            print "you didnt give me a letter!!!"
        else:
            y=False
    for x in range(len):
        #if wo
        print "done"
Run Code Online (Sandbox Code Playgroud)

错误:

    leenghthp=len(p)
TypeError: 'int' object is not callable
Run Code Online (Sandbox Code Playgroud)

python int python-2.7

13
推荐指数
1
解决办法
2万
查看次数

标签 统计

int ×1

python ×1

python-2.7 ×1