Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
For \ While loops
#5
Thanks, I think I did what you said and its still not working

num1= int(raw_input("Enter a number:"))
num2= int(raw_input("Enter a number:"))
for num2 in xrange (num1,num2):
    print num2
    num2 += 1

Now it works
num1= int(raw_input("Enter a number:"))
num2= int(raw_input("Enter a number:"))
for num2 in xrange (num1,num2 + 1):
    print num2
Reply


Messages In This Thread
For \ While loops - by Itay - Oct-31-2018, 02:23 PM
RE: For \ While loops - by j.crater - Oct-31-2018, 02:30 PM
RE: For \ While loops - by Itay - Oct-31-2018, 02:34 PM
RE: For \ While loops - by j.crater - Oct-31-2018, 02:38 PM
RE: For \ While loops - by Itay - Oct-31-2018, 02:49 PM
RE: For \ While loops - by j.crater - Oct-31-2018, 03:01 PM
RE: For \ While loops - by Itay - Oct-31-2018, 03:17 PM
RE: For \ While loops - by ichabod801 - Oct-31-2018, 03:20 PM
RE: For \ While loops - by Itay - Oct-31-2018, 03:27 PM
RE: For \ While loops - by ichabod801 - Oct-31-2018, 07:58 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020