Question: Create a Python program (food_receipt.py). This program is based on Prog Assignment 2 - 3: Food receipt by using functions. Include the following functions: (1)

Create a Python program (food_receipt.py). This program is based on Prog Assignment 2 - 3: Food receipt by using functions. Include the following functions:

(1) get_item(): In this function, Prompt the user to input a food item name, price, and quantity. This function will have no parameters and will return the entered values. To return more than one value from a function, you separate the values you want to return by commas. Example:

def get_name(): # your code return first_name, last_name 

When you call the function in the main, you separate your variable names by commas. Example:

first_name, last_name = get_name() 

(2) print_item(name, price, quantity): In this function, you output an itemized receipt. This function will have three parameters (name, price, quantity) and will print an itemized receipt based on the entered values.

4 rice @ $ 2.3 = $ 9.2 

(3) __main__: In the main, call get_items twice, then print the receipt. When printing the receipt, call print_item twice for the items you have. Also output a mandatory 15% gratuity to the total cost. Then output the total cost, the cost of gratuity, and the grand total. (Submit for 4 points)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!