Order dishes from a menu, then get a bill with discount and GST.
Loops + decisionsAdvanced
Built from 6 kinds of block, between Start and End. Each one has a guide.
B4Coder writes the same program as real code. Change the flowchart in the editor and the code changes with it.
print("Welcome to B4Coder Hotel! 🍽️")print("Menu: 1) Masala Dosa ₹60 2) Veg Biryani ₹180 3) Full Meals ₹120")total = 0price = 0dishes = int(input("How many different dishes would you like? "))for _ in range(dishes): dish = int(input("Dish number (1, 2 or 3)? ")) if dish == 1: price = 60 elif dish == 2: price = 180 elif dish == 3: price = 120 else: print("Sorry, dish " + str(dish) + " is not on the menu.") continue plates = int(input("How many plates? ")) total = total + price * plates print("Added! Food total so far: ₹" + str(total))discount = 0if total >= 500: discount = total * 10 / 100gst = (total - discount) * 5 / 100bill = total - discount + gstprint("Food total: ₹" + str(total))print("Discount (10% on ₹500+): -₹" + str(discount))print("GST (5%): ₹" + str(gst))print("Please pay: ₹" + str(bill))print("Thank you! Your food is on its way. 😋")How each block becomes code: Python · Java · C++ · C# · JavaScript