Created
February 5, 2021 09:44
-
-
Save denoboi/1fac1e828f8a41e112efa9b9b130e13f to your computer and use it in GitHub Desktop.
Write a program to prompt the user for hours and rate per hour using input to compute gross pay. Pay should be the normal rate for hours up to 40 and time-and-a-half for the hourly rate for all hours worked above 40 hours. Put the logic to do the computation of pay in a function called computepay() and use the function to do the computation. The…
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hrs = input("Saati gir pezo: ") | |
h = float(hrs) | |
hrt = input("Rate kac:") | |
r = float(hrt) | |
def computepay(a, b): | |
if (a <= 40): | |
islem = a * b | |
elif (a > 40): | |
islem = 40 * b + (a-40)*b*1.5 | |
return islem | |
t = computepay (h,r) | |
print("Pay",t) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment