2015-11-19 66 views
0

請幫我修復此代碼!當我運行它,它說:「長度沒有定義」Python錯誤「長度未定義」

word1 = "sesquipedalian" 

word2 = "sesquiannual" 
length_of_word1 = length(word1) 

length_of_word2 = length(word2) 

test_number = 4298374272384726348726348726348234 

if length_of_word1>length_of_word2: 
    test_number += length_of_word1%3 
else: 
    test_number -= length_of_word1%3 

print test_number 
+0

使用'len'不'length' –

+1

讓您的標題更具描述性的。就目前而言,它沒有告訴任何人關於這個問題的任何事情。 –

+0

非常感謝你! – Shannon

回答