Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import time
- def main():
- rate = 15.75
- nightDiff = 1.89
- weekendDiff = 3.00
- taxes = 1.204
- hours = float(input("Enter your total hours worked: \n"))
- weekend = float(input("Enter your hours worked on the weekend: \n"))
- grossPay = (rate*hours) + (nightDiff*hours) + (weekendDiff*weekend)
- print ("Your gross pay is: " + str(grossPay))
- answer = int(input("Would you like your net pay? 1: Yes / 2: No \n"))
- if answer == 1:
- netPay = grossPay/1.204
- print("Your net pay is: " + str(netPay))
- elif answer == 2:
- print("Goodbye!")
- main()
- else:
- print ("That is not a valid respose. Please try again.")
- main()
- if __name__ == '__main__':
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement