Windows PowerShell で Python 2.7 を使用しています。
def loop(loop):
i = 0
numbers = []
while i < loop:
print "At the top i is %d" % i
numbers.append(i)
i += 1
print "Numbers now: ", numbers
print "At the bottom i is %d" % i
value = raw_input("Choose the loop value:\n>")
print value
loop(value)
の入力6
として を入力すると、無限ループvalue
になります。loop()
何がうまくいかないのですか?