-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprice_and_VAT.py
42 lines (40 loc) · 1.62 KB
/
price_and_VAT.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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
vat = 0.1
price = int(input("Please type price value: "))
pricePlusVat = price + (price * vat)
if ((price >= 1) & (price <= 1000)):
discount = price * 0.03
finalPrice = pricePlusVat - discount
print("Price before VAT = ", price, "\n")
print("Price plus VAT = ", pricePlusVat, "\n")
print("Discount rate 3% = ", discount, "\n")
print("Final price = ", finalPrice, "\n")
elif ((price >= 1001) & (price <= 2000)):
discount = price * 0.05
finalPrice = pricePlusVat - discount
print("Price before VAT = ", price, "\n")
print("Price plus VAT = ", pricePlusVat, "\n")
print("Discount rate 5% = ", discount, "\n")
print("Final price = ", finalPrice, "\n")
elif ((price >= 2001) & (price <= 5000)):
discount = price * 0.07
finalPrice = pricePlusVat - discount
print("Price before VAT = ", price, "\n")
print("Price plus VAT = ", pricePlusVat, "\n")
print("Discount rate 7% = ", discount, "\n")
print("Final price = ", finalPrice, "\n")
elif ((price >= 5001) & (price <= 10000)):
discount = price * 0.09
finalPrice = pricePlusVat - discount
print("Price before VAT = ", price, "\n")
print("Price plus VAT = ", pricePlusVat, "\n")
print("Discount rate 9% = ", discount, "\n")
print("Final price = ", finalPrice, "\n")
elif (price > 10000):
discount = price * 0.1
finalPrice = pricePlusVat - discount
print("Price before VAT = ", price, "\n")
print("Price plus VAT = ", pricePlusVat, "\n")
print("Discount rate 10% = ", discount, "\n")
print("Final price = ", finalPrice, "\n")
else:
print("Do not be silly, just type the number in codition range")