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, 22.06.2019 03:30
Write a computer program to calculate the three-phase fault current for a fault at f in figure 1.16, with the network normal, and with one line at a time removedproblems 1.1 write a computer program to calculate the three-phase fault current for a fault at f in figure 1.16, with the network normal, and with one line at a time removed 20 power system relaying from service. the positive-sequence impedance data are given in the accompanying table. use the commonly made assumption that all prefault resistance values are (1.0+j0.0) pu, and neglect all resistance values. calculate the contribution to the fault flowing through the cb b and the voltage at that bus. for each calculated case, consider the two possibilities: cb b2 closed or open. the latter is known as the stub-end fault í• figure 1.16 problem 1.1 system data for figure 1.16 from to positive sequence 0.0+j0.1 0.05j0.15 0.04 j0.2 0.01 jo.i 0.015 + j0.15 0.01 j0.19 0.01 +j0.19 0.03+j0.1 0.0+j0.08 6 6 6 from service. the positive-sequence impedance data are given in the accompanying table. use the commonly made assumption that all prefault resistance values are (1.0 + j 0.0) pu, and neglect all resistance values. calculate the contribution to the fault flowing through the cb b1, and the voltage at that bus. for each calculated case, consider the two possibilities: cb b2 closed or open. the latter is known as the “stub-end” fault.
Answers: 2
question
Computers and Technology, 22.06.2019 20:00
Need asap assignment directions: think of an organization (business, religious institution, volunteer organization, sports team) with which you have been involved. imagine outfitting it with an it infrastructure. prepare a plan for what you would do to support outfitting it. draw a map of a network connecting all the individuals, give them pcs and printers, and lay out the design as best you can. the purpose is to begin working with these concepts, not to build a perfect network.
Answers: 2
question
Computers and Technology, 23.06.2019 00:30
Pl i need the answer now ! which one of the following is considered a peripheral? a software b mouse c usb connector d motherboard
Answers: 1
question
Computers and Technology, 23.06.2019 13:30
Jace needs to answer a question on square roots to win a quiz. how can he use a spreadsheet to find the square root of 786? a. use the functions round and count b. create a table and chart c. use the function sqrt d. use the function now
Answers: 3
You know the right answer?
Item = "quesadilla"
meat = "steak"
queso = False
guacamole = False
double_me...
Questions
question
English, 31.01.2020 13:55
question
Mathematics, 31.01.2020 13:55
question
Mathematics, 31.01.2020 13:55
Questions on the website: 13722367