5. The names are the same! Now what?¶

5.1. Full Names¶
The solution is to adopt full names.
from bank import *
import fatec
import japa
items = ["Sfiha", "Cuisine", "Cake", "Cheese Bread"]
prices = [1.50, 2.20, 1.80, 1.20]
running = True
while running:
option = 1
for choose in items:
print(str(option) + "." + choose)
option += 1
print(str(option) + ".Finish")
choose = int(input("Choose an option"))
if choose == option:
# chose the last option Finish
running = False
else:
card = input("Credit Card Number: ")
price = fatec.discount(prices[choose - 1])
if items[choose - 1] == "Cake":
price = japa.discount(price)
(price, card, items[choose-1])
5.2. Result¶


-
On a scale from 1 (needs improvement) to 3 (excellent),
how would you rate this chapter?
- 1
- 2
- 3
You have attempted of activities on this page