1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
quester [9]
3 years ago
7

Item = "quesadilla"

Computers and Technology
1 answer:
jok3333 [9.3K]3 years ago
7 0

Answer:

item = "quesadilla"

meat = "steak"

queso = False

guacamole = False

double_meat = False

base_price = 4.5

if item == "quesadilla":

base_price = 4.0

elif item == "burrito":

base_price = 5.0

if meat == "steak" or meat == "pork":

base_price += 0.50

if 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 item != "nachos":

base_price += 1.0

print(base_price)

Explanation:

  • Use a conditional statement to check if meat is steak or pork then add 0.50 to base_price .
  • Check if the meat is steak or pork, then double_meat adds 1.50 or 1.0 otherwise .
  • Check if meat is steak and its double_meat , then add 1.50  and if its for guacamole, then add 1.00 to base_price . If queso is there and item is not nachos, add 1.00 to base_price .
  • Finally when item is nachos, no need to add any money to base_price .

You might be interested in
Assume that the string oldSeq has been properly declared and initialized and contains the string segment. Write a code segment t
son4ous [18]

String oldSeq="1100000111";

String segment="11";

String newSeq=oldSeq.replaceFirst(segment, "");

7 0
3 years ago
Among your selection in different online interfaces, which are your top three favorites?​
topjm [15]
What is this ? History or ?
6 0
3 years ago
Read 2 more answers
Select the four tactics that cyber criminals use for stealing information from the list below.
Snowcat [4.5K]
Baiting clickjacking pharming spamming
6 0
2 years ago
The first generation of computers used vaccum tubes .Why were they replaced by the transistors​
suter [353]

Answer:

hiiiiiiiiiiiiiiiiiiiiiiiiiii

7 0
3 years ago
Read 2 more answers
Explain why decomposition will be used in creating the algorithm for the game including two dice.
RoseWind [281]
I saw this question while reviewing the notes in class
7 0
3 years ago
Other questions:
  • A __________ network is good for connecting computer clusters.
    13·2 answers
  • Where does gateway antivirus scan for viruses
    7·1 answer
  • You are the owner of a computer component manufacturing company. Your manufacturing plant has 10 different machines that can be
    6·1 answer
  • Which of the following devices are least likely to deny a connection inline when an attack is detected? (select 2)
    6·1 answer
  • PLEASE HELP ASAP!!
    13·1 answer
  • Write a method public static ArrayList merge(ArrayList a, ArrayList b) that merges two array lists, alternating elements from bo
    14·1 answer
  • Technician A says that a lead acid battery uses straight Hydrochloric acid for electrolyte. Technician B says that a lead acid b
    10·2 answers
  • 12. How many different documents can<br> you have open at one time?
    8·1 answer
  • The bag class in Chapter 5 has a new grab member function that returns a randomly selected item from a bag (using a pseudorandom
    8·1 answer
  • 1 #include 2 3 int max2(int x, int y) { 4 int result = y; 5 if (x &gt; y) { 6 result = x; 7 } 8 return result; 9 } 10 11 int max
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!