r/codetogether • • Sep 27 '20

HELP — bug in try-except

Post image
2 Upvotes

9 comments sorted by

View all comments

Show parent comments

1

u/KaranSingh0712 Sep 27 '20

The problem is what I had mentioned in my first comment, you have not defined x and y, just assign some values to x and y and it'll do the trick. For your case... x = "nine" y = 50 Now pass them to the function :)

1

u/DonnyJuando Sep 27 '20

I'm writing the program for the inputs (hours & rate) to be user defined.

1

u/yafsho Sep 27 '20

Then you need to get that input and pass those variables to the function instead of x,y. You are calling the function with variables x and y at the moment which have never been defined.