Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error in my code?
#7
(Mar-17-2021, 10:37 PM)deanhystad Wrote: There obviously is a problem with the calling code that appears when it is called from inside a function. Without seeing where the error is appearing it is difficult to see where the error occurred.

This code has no errors because it works when a == 1.
x = 5 / a
Never mind that it fails when a == 0. That is a problem with a, not the code.

Not sure I follow you. I'm passing 4 variables outside or within a function. x (0 position) is not used.

 x = sys.argv[0]
    a = sys.argv[1]
    b = sys.argv[2]
    c = sys.argv[3]
    d = sys.argv[4]
Reply


Messages In This Thread
Error in my code? - by ebolisa - Mar-17-2021, 07:04 PM
RE: Error in my code? - by Larz60+ - Mar-17-2021, 07:13 PM
RE: Error in my code? - by ebolisa - Mar-17-2021, 07:52 PM
RE: Error in my code? - by deanhystad - Mar-17-2021, 08:37 PM
RE: Error in my code? - by ebolisa - Mar-17-2021, 09:00 PM
RE: Error in my code? - by deanhystad - Mar-17-2021, 10:37 PM
RE: Error in my code? - by ebolisa - Mar-17-2021, 10:45 PM
RE: Error in my code? - by ebolisa - Mar-17-2021, 11:38 PM

Forum Jump:

User Panel Messages

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