Question: Pls help me write this function in python. (pls include commented explanation) Function name (7): class writing Description: Write a class called Burrito. A Burrito
Pls help me write this function in python. (pls include commented explanation)
Function name (7): class writing Description: Write a class called "Burrito". A Burrito should have the following attributes (instance variables): meat, to_go, rice, beans, extra_meat (default: False), guacamole (default: False), cheese (default: False), pico (default: False), corn (default: False), Add a method called "get_cost" to the Burrito class. It should accept zero arguments (except for "self", of course) and it will return a float. Here's how the cost should be computed:
- The base cost of a burrito is $5 - If the burrito's meat is "chicken", "pork" or "tofu", add $1 to the cost - If the burrito's meat is "steak", add $1.50 to the cost - If extra_meat is True and meat is not set to False, add $1 to the cost - If guacamole is True, add $0.75 to the cost
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
