So, I'm "self teaching" python, and I'm trying to challenge myself. I'll take the answer but a "hint" would be more helpful in the long run. So, I'm making a simple pay calculator program. I have some simple code, but I don't know how to add the "OT = over time" hours in. I'd like to calculate anything over 40 hours gets time and a half. so the following is my code.
rate = 10 ot_rate = 15 time = input("please enter your time: ") time_int= int(time) pay = int(rate) * int(time) if time_int > 40: print(f" Your pay is ${}") else: print(f" Your pay is ${pay}")
Larz60+ write Jul-30-2022, 10:06 PM:
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
Fixed for you this time. Please use bbcode tags on future posts.
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
Fixed for you this time. Please use bbcode tags on future posts.