shopping list example
发布时间
阅读量:
阅读量
__auther__ = "ABC"
product_list = [
("Iphone",5800),
("IPAD",3800),
("Iwatch",12800),
("Coffee",28),
]
salary = input("Input your salary:")
if salary.isdigit():
salary = int(salary)
while True:
for item in product_list:
print(product_list.index(item),item)
break
C:\Users\Amber\PycharmProjects\pythonProject\venv\Scripts\python.exe C:/Users/Amber/PycharmProjects/pythonProject/CH01/shopping_cart.py
Input your salary:2000
全部评论 (0)
还没有任何评论哟~
