Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Simple Life Calculator
- #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.
- vatRate = 1.2
- print("Welcome to the Simple Life Calculator")
- typeInput = int(input("Press 1 for VAT calculator, press 2 for TAX calculator and press 3 for Times table"))
- if typeInput == 1:
- print("You have selected the VAT calculator.")
- vatInput = int(input("What is your base amount before tax?"))
- vatFinal = vatInput * vatRate
- print ("Your calculated amount is: £",vatFinal)
- elif typeInput == 2:
- print("You have selected the TAX calculator")
- taxInput = int(input("How much did you earn last year?"))
- if taxInput <= 11000:
- print("You don't have to pay any tax!")
- elif 11001<= taxInput <=43000:
- print("You need to pay 20% tax.")
- elif typeInput == 3:
- print("You have selected the Times table calculator.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement