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
Which of the following commands would instruct OSPF to advertise ONLY the 192.168.10.0/24 network in Area 0?
xz_007 [3.2K]

Answer:

First, you need to start the OSPF process by executing the command:

<em>Router (config)# router ospf {process-ID#}</em>

Then, you have to instruct the router to advertise the networks that are directly linked to it by entering this network command with the area ID number for that network:

Router (config-router)# network {192.168.10.0} {255.255.255.0} area {0}

8 0
4 years ago
A program that accepts insurance policy data, including a policy number, customer last name, customer first name, age, premium d
valentina_108 [34]

Answer:

  1. policy_num = int(input("Enter policy number: "))
  2. lastName = input("Enter last name: ")
  3. firstName = input("Enter first name: ")
  4. premiumDate = input("Enter premius due date (mm/dd/yyyy): ")  
  5. numAcc = int(input("Enter number of driver accident in the past three years: "))
  6. if(policy_num <1000 or policy_num > 9999):
  7.    policy_num = 0  
  8. dateComp = premiumDate.split("/")
  9. month = int(dateComp[0])
  10. day = int(dateComp[1])
  11. year = int(dateComp[2])
  12. if(month < 1 or month > 12):
  13.    month = 0
  14.    day = 0
  15.    year = 0  
  16. else:
  17.    if(month == 1 or month == 3 or month == 5 or month == 7 or month == 8 or month == 10 or month == 12):
  18.        if(day < 1 or day > 31):
  19.            month = 0
  20.            day = 0
  21.            year = 0  
  22.    elif(month == 4 or month == 6 or month == 9 or month == 11):
  23.        if(day <1 or day > 30):
  24.            month = 0
  25.            day = 0
  26.            year = 0
  27.    elif(month == 2):
  28.        if(day < 1 or day > 29):
  29.            month = 0
  30.            day = 0
  31.            year = 0
  32. print("Policy number: " + str(policy_num))
  33. print("Last name: " + lastName)
  34. print("First name: " + firstName)
  35. print("Premium Date: " + str(month) + "/" + str(day) + "/" + str(year))
  36. print("Number of driver accidentin the last three years: " + str(numAcc))

Explanation:

The solution code is written in Python 3.

Firstly use input function to prompt user to enter all the necessary insurance policy data (Line 1 - 5).

Next create an if statement to validate the input policy number. If the policy number is not within the range of 1000 - 9999, set the policy number to zero (Line 7 -8).

Next, split the input premium date into month, day and year (Line 10 -13). It is followed by checking the month if it is between 1 - 12. If not, set the month, day and year to zero (Line 15 - 18). Otherwise the program will proceed to validate the month based on the maximum and minimum number of days for a particular month (Line 20 - 34). If the day is out of range, set month, day and year to zero.

Lastly, use print function to display the policy data (Line 36 - 40).

8 0
4 years ago
What is the cheapest type of printer to buy and run?
myrzilka [38]
It depends solely on how much you will use it. For example, laser printers are more suitable for offices, schools, and environments, where the printer is used almost constantly. If it's used a lot, you're probably looking at a laser printer, since the cartridges have a slightly higher price, but a much higher yield. If you can't afford a laser printer, and you're only going to use it at home, you're probably looking at an inkjet. If you need to print off something for school, ask your teacher, or someone that works at your school. Some secondary/high schools might allow you to use their printers at a lower price
7 0
4 years ago
Read 2 more answers
Program C++ I need help!
nikitadnepr [17]

Answer:#include <iostream>

using namespace std;

int main()

{

   int factorial = 1;

   for (int i = 5; i > 0; i--) {

       factorial = factorial * i;

   }

   cout<<factorial;

   return 0;

}

Explanation:

3 0
3 years ago
What are the two basic literary forms?
Korolek [52]
Fiction and nonfiction
6 0
3 years ago
Other questions:
  • This question involves the creation of user names for an online system. A user name is created based on a user’s first and last
    13·1 answer
  • according to the National Automobile Dealers Association, a single dealership may employ people with as many as 57 different A.
    6·1 answer
  • Difference between Hard copy and Soft copy?​
    13·1 answer
  • The NFiPA 704 system uses a numerical value between _____ and _____ to indicate the level of hazard for that particular chemical
    6·2 answers
  • How to can you avoid becoming a victim of identity theft?
    10·1 answer
  • ________ is a programming language invented by netscape used to control the objects on an html page and handle interactions with
    5·1 answer
  • Why don't I have friends?
    11·2 answers
  • What code would you use to create the login button?
    11·1 answer
  • Hello can someone help with the output of this please?
    5·1 answer
  • What are 15 importance of information processing cycle?
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!