Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def main():
- while True:
- print("Welcome to the Tax Calculator")
- first_name = (input("Please enter your first name: "))
- income = float(input("Please enter your monthly income: "))
- if income < 1000:
- print(first_name + ", you have no withholding this month.")
- if income == 0:
- break
- elif income < 2000:
- tax = 15.50
- elif income < 3000:
- tax = 50.25
- elif income < 4000:
- tax = 105.25
- elif income >= 4000:
- tax = income * .04
- print(first_name + ", your estimated monthly withholding will be: $") + str(format(tax, '.2f'))
- cmd = input('Do you want to quit? Enter \'0\'!')
- if cmd == '0':
- break
- print("Press 'Enter' to close program")
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement