2014-10-06 37 views
-3

我寫了一個簡單的愛情程序,其中對於每個元音用戶都得到了最後輸出的點。代碼中有一個未知的錯誤,我無法注意到這一點,所以如果有人能指出這一點,我會很感激。簡單代碼中的未知錯誤(Python)

awesome=0 
name=input("Enter your name, wasteman") 
for char in name: 
    if char in ["a","e","i","o",u"]: 
     awesome += 1 
print("your awesome level is: " + str(awesome)) 

回答

2
["a","e","i","o",u"] <- missing opening quote around `u` 

它應該是:

["a","e","i","o","u"]