2014-12-31 80 views
0

我在python中得到了上述錯誤。SyntaxError:在Python中解析時意外的EOF

w=[] 
h=[] 
l=int(input()) 
t=int(input()) 

for i in range(t): 
    n=raw_input() 
    w.append(n) 
    n=int(input()) 
    h.append(n) 

for i in range(t): 
    if w<l and h<l: 
     print ("UPLOAD ANOTHER") 
    elif w>l and h>l and w!=h: 
     print ("CROP IT") 
    elif w>=l and h>=l and w==h: 
     print("ACCEPTED") 
+0

你得到的異常時,首先啓動腳本或與它交互時? –

+0

http://stackoverflow.com/questions/5074225/python-unexpected-eof-while-parsing可能的副本 –

+0

爲什麼在另一個地方使用'input()'而在另一個地方使用'raw_input()'?你知道他們是不同的,是嗎? – cdarke

回答

0

您可能給出了n=int(input())零件的空輸入或'\ n'。嘗試輸入數字作爲輸入。

將此行放入您的終端 x = int(input())。並給出空的輸入,(只需點擊輸入)。足底..

SyntaxError: unexpected EOF while parsing

相關問題