[Tutor] How to make the loop work?

Peter Jessop pjlists at gmail.com
Thu Jun 22 15:09:10 CEST 2006


It's basically correct but you need to convert the raw_input to integer.

c=0
d=int(raw_input("input number limit: "))
while 1:
  c = c + 1
  if c == d:
    break
  print c


More information about the Tutor mailing list