0

I cannot continue

Calculate and display the retail price for product registration until user enter a negative wholesale cost. Retail price = wholesale price * 0.25 Store all retail price list and print out a price list in table format. What I have is below: retail_price = 0 while (True): wholesale_cost = int(input("Enter your wholesale cost:")) if (wholesale_cost < 0): break else: retail_price = wholesale_cost * 0.25 print(retail_price)

1st Jun 2018, 6:57 AM
Jiayi Ke
Jiayi Ke - avatar
2 Réponses
+ 7
You just need to add a list variable, like prices = [] and append retail_price to it, each time it is calculated. Then, when the loop is broken, print out this list.
1st Jun 2018, 8:21 AM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
- 2
it will be a very nice price list without products names))))
1st Jun 2018, 8:33 AM
andrey
andrey - avatar