Skip to content

Instantly share code, notes, and snippets.

@mohameddouma
Created August 5, 2021 13:27
Show Gist options
  • Save mohameddouma/f179e19d5bf5a93a3564822be34d39da to your computer and use it in GitHub Desktop.
Save mohameddouma/f179e19d5bf5a93a3564822be34d39da to your computer and use it in GitHub Desktop.
Programming for Everybody (Getting Started with Python) Week 6
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