Created
August 5, 2021 13:27
-
-
Save mohameddouma/f179e19d5bf5a93a3564822be34d39da to your computer and use it in GitHub Desktop.
Programming for Everybody (Getting Started with Python) Week 6
This file contains 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
def computepay(h, r): | |
if h>40: | |
return 40*r +(h-40)*r*1.5 | |
else: | |
return h*r | |
hrs = float(input("Enter Hours:")) | |
r= float(input("Enter rate per hour:")) | |
p = computepay(hrs,r) | |
print("Pay",p) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment