Toptube Video Search Engine



Title:Python shopping cart program ๐Ÿ›’
Duration:07:14
Viewed:94,363
Published:08-11-2022
Source:Youtube

#python #tutorial #course # Shopping cart exercise foods = [] prices = [] total = 0 while True: food = input("Enter a food to buy (q to quit): ") if food.lower() == "q": break else: price = float(input(f"Enter the price of a {food}: $")) foods.append(food) prices.append(price) print("----- YOUR CART -----") for food in foods: print(food, end=" ") for price in prices: total += price print() print(f"Your total is: ${total}")



SHARE TO YOUR FRIENDS


Download Server 1


DOWNLOAD MP4

Download Server 2


DOWNLOAD MP4

Alternative Download :