Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
python input
#4
Well yeah, "f" doesn't represent an integer in decimal. int throws an exception if it can't convert its argument (the exception is the ValueError you're seeing. You need to put that code within a try block and handle the exception in an except block.
Reply


Messages In This Thread
python input - by maciek123 - Sep-08-2019, 09:48 AM
RE: python input - by Larz60+ - Sep-08-2019, 09:57 AM
RE: python input - by maciek123 - Sep-08-2019, 10:00 AM
RE: python input - by ndc85430 - Sep-08-2019, 10:03 AM
RE: python input - by Larz60+ - Sep-08-2019, 10:07 AM
RE: python input - by maciek123 - Sep-08-2019, 10:17 AM

Forum Jump:

User Panel Messages

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