subject

Item = "quesadilla"
meat = "steak"
queso = False
guacamole = False
double_meat = False


You may modify the lines of code above, but don't move them! When you submit your code, we'll change these lines to assign different values to the variables.

Let's further expand our previous program to cover a broader menu variety. Instead of just burritos, now the program should cover three menu items: quesadillas, burritos, and nachos. Instead of separate booleans for steak and pork, we instead have a string that could be "steak", "pork", "chicken", "tofu", and "beef". We still have booleans for queso and guacamole, but we also have a boolean for double meat.
Your code should calculate the price as follows:

- The base price for a quesadilla is 4.00, for nachos is 4.50, and for burritos is
5.00.
- If meat is steak or pork, add 0.50. Any other meat adds no money to the price.
- guacamole always adds 1.00 to the price.
- queso adds 1.00 to the price UNLESS the item is nachos, in which case it
adds nothing.
- double_meat adds 1.50 if the meat is steak or pork, or 1.00 otherwise.

base_price = 4.5

if item == "quesadilla":
base_price = 4.0
elif item == "burrito":
base_price = 5.0
if meat == "steak":
base_price += 0.50
if meat == "pork":
base_price += 0.50
elif meat == "steak" and double_meat:
base_price += 1.50
elif meat == "pork" and double_meat:
base_price += 1.50
elif double_meat:
base_price += 1.0
if guacamole:
base_price += 1.0
if queso and not "nachos":
base_price += 1.0

print(base_price)

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 13:00
The documents a system at the end of the design phase, identifies any changes since the beginning of the project, and includes testing and verification of all system requirements and features. functional baseline operational baseline allocated baseline product baseline
Answers: 1
question
Computers and Technology, 22.06.2019 16:30
Which of the following statements best describes it careers?
Answers: 2
question
Computers and Technology, 23.06.2019 06:10
The head restraint should be adjusted so that it reaches a.the top of your ears b.the base of your skull c.the top of the head
Answers: 1
question
Computers and Technology, 23.06.2019 13:30
Font size, font style, and are all aspects of character formatting.
Answers: 2
You know the right answer?
Item = "quesadilla"
meat = "steak"
queso = False
guacamole = False
double_me...
Questions
Questions on the website: 13722363