-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_file2.py
28 lines (24 loc) · 971 Bytes
/
test_file2.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# '''
# Depending on where an individual is from we need to tax them
# appropriately. The states of CA, MN, and
# NY have taxes of 7.5%, 9.5%, and 8.9% respectively.
# Use this information to take the amount of a purchase and
# the corresponding state to assure that they are taxed by the right
# amount.
# '''
state = str(input("Enter the state\n"))
print(state)
purchase_amount = int(input("Enter the purchase amount\n"))
if state == "CA":
tax_amount = .075
total_cost = purchase_amount*(1+tax_amount)
result = "Since you're from {}, your total cost is {}.".format(state, total_cost)
elif state == 'MN':
tax_amount = .095
total_cost = purchase_amount*(1+tax_amount)
result = "Since you're from {}, your total cost is {}.".format(state, total_cost)
elif state == "NY":
tax_amount = .089
total_cost = purchase_amount*(1+tax_amount)
result = "Since you're from {}, your total cost is {}.".format(state, total_cost)
print(result)