2016-04-01 17 views
-2
print("Hello. Please Proceed to Enter a Range of Numbers") 
first = int(input("please enter the first number in the range: ")) 
last = int(input("please enter the last number in the range: ")) 

numlist=list(range(first,last) 

解析中にeofが予想される。 print(numlist) を追加すると、追加エラーが発生します。 numlistが宣言された後値リストを印刷するには?

+0

これが正確なコード_の場合、あなたは閉じたparanthesisを持っていません。 – Lafexlos

+0

最後の行にカッコがありません。 – zondo

+0

ありがとうございます。どのように20を含むリストを作ることができますか? '10,11,12,13,14,15,16,17,18,19] – ipconfig

答えて

0
print("Hello. Please Proceed to Enter a Range of Numbers") 
first = int(input("please enter the first number in the range: ")) 
last = int(input("please enter the last number in the range: ")) 

numlist=list(range(first,last)) #FTFY 
for x in numlist: 
    print(x) 

は、基本的にこれが何をするか、それを横断し、新しい行にすべての値を出力している

あなたの主な問題は、numlist宣言

上の第2のRPARENを欠落していたということでした
関連する問題