28 lines
746 B
Python
28 lines
746 B
Python
while True:
|
|
produkt = input('Welches Produkt (Gummibaerchen, Lakritzstangen, Playstation) wünschen Sie? ')
|
|
|
|
prices = {
|
|
"Gummibaerchen": 0.05,
|
|
"Lakritzstangen": 0.30,
|
|
"Playstation": 199.00
|
|
}
|
|
|
|
if (not produkt in prices):
|
|
print("Falscher Artikelname!")
|
|
continue
|
|
|
|
try:
|
|
menge = int(input('Welche Menge wünschen Sie? '))
|
|
except:
|
|
print("Keine gültige Menge!")
|
|
continue
|
|
|
|
total_price = prices[produkt] * menge
|
|
netto_price = total_price / 1.07
|
|
tax_price = total_price - total_price / 1.07
|
|
|
|
print (f'Netto ohne MwSt: EUR {netto_price:.2f}')
|
|
print (f'MWSt: EUR {tax_price:.2f}')
|
|
print (f'Zu bezahlen: EUR {total_price:.2f}')
|
|
|
|
break |