Python Forum
Not sure how to fix this loop
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Not sure how to fix this loop
#2
You have pretty much figured what the problem is. On line 17, you convert your input to an integer with length = int(. But strings cannot be converted to integer. So the error happens before the execution reaches if statement. Removing int() (the conversion) might do the trick. Then it's only a matter of how you want floats to be handled, if user inputs them.
Reply


Messages In This Thread
Not sure how to fix this loop - by TheFunkyKoala - May-09-2018, 05:45 AM
RE: Not sure how to fix this loop - by j.crater - May-09-2018, 06:12 AM
RE: Not sure how to fix this loop - by striver - May-09-2018, 06:55 AM

Forum Jump:

User Panel Messages

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