Advertisement
Bad_luck

Untitled

Sep 28th, 2012
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.78 KB | None | 0 0
  1. #I want this program to add up my expense
  2. #I want this program to add up my income
  3. #I want this program to give me a final gross income after expenses
  4. #I want to get inputs from the user
  5.  
  6. print "\nWe are going to calculate your gross income"
  7. print "but first we need to know a few things:\n "
  8.  
  9. print "What is your total income?"
  10. print "(To add income just put in numbers like so: 123 + 123)"
  11. income = raw_input( ": " )
  12. income = int ()
  13.  
  14. print "Excellent! Now what is the amount of total expenses?"
  15. expenses = raw_input(": ")
  16. expenses = int ()
  17.  
  18. print "One moment while we calculate..."
  19. print "(push ENTER to continue. CTRL-C to exit)"
  20. raw_input("? ")
  21.  
  22. gross = ("%d - %d") % (income, expenses)
  23. gross = int ()
  24. print "Your total gross income is: %d" % gross
  25. print "Have a nice day!"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement