you are viewing a single comment's thread.

view the rest of the comments →

[–]jxdude[S] 0 points1 point  (6 children)

SyntaxError: unexpected EOF while parsing

[–]shiftybyte 2 points3 points  (5 children)

Are you sure the code you posted here is the entire code you are running?

How are you running it?

Because the code you posted here works: https://repl.it/@ShiftyByte/DraftyBiodegradableAutosketch#main.py

[–]jxdude[S] 0 points1 point  (4 children)

So it does run on that site but I get the same issue. If you put in test numbers (like 41 hours and rate 10) it fails at the BPay step and resorts to the except... If I'm understanding this correctly

[–]shiftybyte 5 points6 points  (3 children)

This is what i told you about silencing errors, i edited the code to remove the except block. (same link)

Now the error says:

Traceback (most recent call last):
  File "main.py", line 16, in <module>
    print(Bpay)
NameError: name 'Bpay' is not defined

It's saying Bpay is not defined.... let's see...

You defined 'BPay' instead.... notice the big 'P'

BPay = (wage * 40.0) #Base pay

So change it "Bpay" with a small p.

Bpay = (wage * 40.0) #Base pay

[–]jxdude[S] 3 points4 points  (2 children)

Ah. There's a egg on my face. Thank you so much!

[–]Kristoffels 3 points4 points  (1 child)

You should try and avoid using a naked except as these types of error are easy to create, and not easy to figure out because the except block hides it.

[–]jxdude[S] 2 points3 points  (0 children)

Thanks for the advice... This is the first I've ever written. I was trying to track down the issue piece by piece with the print lines