2017-10-18 62 views

回答

0
while i not in "aeiouAEIOU": 
    result += i 

你的循環條件僅取決於i價值,但你的循環體不改變i。因此,如果循環完全進入,它將永遠循環。你可能要寫if i not in "aeiouAEIOU"

2

行:

while i not in "aeiouAEIOU": 

將永遠運行,如果i不是元音,這恰好在Hello的情況。替換爲

if i not in "aeiouAEIOU":