Advertisement
Guest User

Untitled

a guest
Dec 7th, 2016
269
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. #Simple Life Calculator
  2.  
  3. #Create a program that has 3 simple calculators within it, eg VAT, TAX and Times table. Allow users to choose which calculator they want to use and then carry out that calculation.
  4.  
  5. vatRate = 1.2
  6. print("Welcome to the Simple Life Calculator")
  7. typeInput = int(input("Press 1 for VAT calculator, press 2 for TAX calculator and press 3 for Times table"))
  8.  
  9. if typeInput == 1:
  10. print("You have selected the VAT calculator.")
  11. vatInput = int(input("What is your base amount before tax?"))
  12. vatFinal = vatInput * vatRate
  13. print ("Your calculated amount is: £",vatFinal)
  14.  
  15. elif typeInput == 2:
  16. print("You have selected the TAX calculator")
  17. taxInput = int(input("How much did you earn last year?"))
  18. if taxInput <= 11000:
  19. print("You don't have to pay any tax!")
  20. elif 11001<= taxInput <=43000:
  21. print("You need to pay 20% tax.")
  22.  
  23. elif typeInput == 3:
  24. print("You have selected the Times table calculator.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement