Question 5: Input Food Shop Receipt

🍔 Food Shop Receipt

Use: import task_input_05

Daniel visits a food shop to buy burgers and drinks. The shop needs his name, the number of burgers he wants, the price of each burger, and the number of drinks he wants. Write a Python program that collects this information and calculates his total bill.
  • Use input("What is your name? ") to ask for the customer’s name. Store the answer in a variable called name. Do not convert this input to an integer.
  • Use input("How many burgers? ") to ask how many burgers the customer wants. Store the answer in burgers_text.
  • Convert burgers_text to an integer using int() and store it in burgers.
  • Use input("Price of each burger? ") to ask for the price of one burger. Store the answer in burger_price_text.
  • Convert burger_price_text to an integer using int() and store it in burger_price.
  • Use input("How many drinks? ") to ask how many drinks the customer wants. Store the answer in drinks_text.
  • Convert drinks_text to an integer using int() and store it in drinks.
  • Store the price of each drink in a variable called drink_price and set it to 3.
  • Calculate the total burger cost and store it in burger_total using burgers * burger_price.
  • Calculate the total drink cost and store it in drink_total using drinks * drink_price.
  • Calculate the complete bill and store it in total_bill using burger_total + drink_total.
  • Print exactly two lines:
    Customer: <name>
    Total bill: <total_bill>
Write what you are looking for, and press enter to begin your search!