+ 5
Exercises on python
Pls, im a beginner in python and i need help with writing the code of the following; in python3 1) Write a program to prompt the user for hours and rate per hour to compute gross pay. ex: Enter Hours: 35 Enter Rate: 2.75 Pay: 96.25 2) Rewrite your pay computation to give the employee 1.5 times the hourly rate for hours worked above 40 hours.
2 Respostas
+ 1
#something like this?
x=float(input("enter hours\n"))
y=float(input("enter rate\n"))
if x > 40:
y*=1.5
print("overtime")
print(x*y)
else:
print("no overtime")
print(x*y)
+ 4
Thank you n3v375 for your help and time