Skip to content

Instantly share code, notes, and snippets.

@dylanreed
Created May 11, 2012 20:52
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dylanreed/2662341 to your computer and use it in GitHub Desktop.
Save dylanreed/2662341 to your computer and use it in GitHub Desktop.
Taxes
def math(hours, wage, tax):
pretax = hours * wage #figures gross income
taxes = pretax * tax #figures how much goes into taxes
leftover = pretax - taxes #figures how much will be leftover
print "You have made $",pretax
print "Put $", taxes, " in the bank for taxes."
print "$", leftover, " is yours!!"
print "Figure out how much to put in the bank for taxes."
print "These figures are based on working in Colorado"
print "and making less then $30,000 a year."
hours = input("How many hours did you work? ")
wage = input("How much do you get paid per hour? ")
tax = .27 #your tax rate in decimal form (27% = .27)
math(hours, wage, tax)
@harperreed
Copy link

This is great! You should add a space after the ? marks

@dylanreed
Copy link
Author

Added

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment