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
STALIN [3.7K]
3 years ago
10

Write a loop that continually asks the user what food the user has in their refrigerator until the user enters apples, in which

case the loop ends. It should acknowledge the user in the following format. For the first food, the user might say "hamburger," so your response would be, "You have a hamburger with a total of 1 food(s) if they enter hamburger, and so on until they enter “apples” at which point the loop ends. ---- make sure you save your file as "may28.py" *
Computers and Technology
1 answer:
almond37 [142]3 years ago
7 0

(Disclaimer: I am not a professional, so it might not be the most concise answer possible, but I did run the Python script and it works)

Answer:

user_input = input("What food do you have in your refrigerator? ").lower()

count = 0

while True:

   if user_input != 'apples':

       count += 1

       print(f'You have a {user_input} with a total of {count} food(s)\n')

       user_input = input("What food do you have in your refrigerator? ")

   else:

       break

You might be interested in
WILL GIVE Brainliest!!!!
12345 [234]

Answer:

start

Explanation:

5 0
2 years ago
Read 2 more answers
1. Different algorithms are used to make decisions on load balancing. These include random allocation, round-robin, weighted rou
jok3333 [9.3K]

Answer:

The algorithms and their advantages-disadvantages are given below.

Explanation:

1. Least Connection

Advantage:

The load balances track the transfers constantly, as well as read the details.

Disadvantage:

Server efficiency is indeed not optimal because there are different application computing abilities.

2. Round robin:

Advantage:

Implementation is simple and easily understandable.

Disadvantage:

This methodology or algorithm seems to be suitable for more than just clusters composed of servers with similar specs.

3.  Least Loaded Algorithm

Advantage:

We relate to that as the base technique, and then use it as the basis for comparison with several other strategies results.

Disadvantage:

Such knowledge is almost always unclear when the demands appear, and therefore it is quite hard to accomplish to be using the standard algorithm.

4. Dynamic Round Robin

Advantage:

Easy to execute, it calculates almost all of the server pressures in real-time.

Disadvantage:

Might trigger one processor to overrun while some are underutilized.

5. Weighted Round-Robin Allocation

Advantage:

This is an evolved round-robin edition that removes the shortcomings of that algorithm in a straightforward round.

Disadvantage:

It doesn't quite recognize the specialized criteria for high availability, including response times for each application.

3 0
3 years ago
When creating an input/output table, where do you enter the formula?
balu736 [363]

When creating an input/output table, where do you enter the formula?  

A. In the input cell

B. In the output cell

C. In the title cell

D. In the table of contents


<u>ans. (B) In the output cell</u>

4 0
3 years ago
Write multiple if statements: If carYear is before 1968, print "Probably has few safety features." (without quotes). If after 19
jekas [21]

Answer:

Following is the statement in the C language :

if(carYear < 1968)

printf("\nProbably has a few safety features.\n");

if(carYear > 1970 && carYear <=1991 )

printf("\nProbably has head rests.\n");

if(carYear > 1991 && carYear <=2002)

printf("\nProbably has anti-lock brakes\n.");

if(carYear > 2002)

printf("\nProbably has airbags.\n");

Explanation:

Following is the description of the statement:

  • In the given question we used if block. The if block is only executed when their condition is true.
  • if(carYear < 1968) In this we check we the value of "carYear" variable is less then 1968 then it prints "Probably has a few safety features." in the console window.
  • if(carYear > 1970 && carYear <=1991) In this we check we the value of "carYear" variable is greater then 1970 and less then 1992 it prints "Probably has head rests" in the console window.
  • if(carYear > 1991 && carYear <=2002 ) In this we check we the value of "carYear" variable is greater then 1991 and less then 2003 it prints "Probably has anti-lock brakes" in the console window.
  • if(carYear > 2002) In this we check we the value of "carYear" variable is greater then 2002 then it prints "Probably has airbags" in the console window.

6 0
3 years ago
Which BEST describes how the author’s purpose is revealed? A) The speaker appeals to the emotions of the audience in section 10.
tatiyna

You probably meant languge arts not Tech.

Anyways I will not be sure unless I read the book but..C most of the time is correct sooo sorry I can't help much unless I read the book

I would suggest <u>B) The speaker appeals to the emotions of the audience in section 9.</u>

<u />

I'm also sorry that I'm late but I hope someone else who searchs this up can use this

<u></u>

<u>Sorry If I'm wrong</u>

8 0
3 years ago
Other questions:
  • A phone call costs $0.58 plus $0.15 cents per minute. If the total charge for the call was $4.78, how many minutes was the call?
    15·1 answer
  • PLEASE DO NOT ANSWER IT IF YOU DO NOT KNOW THEM!!
    14·2 answers
  • What is the financial aspect for a business as to what database software they will buy?
    6·1 answer
  • When using a public computer or network, you should always _______. A. install a firewall. B. run an anti-virus program beforeha
    11·2 answers
  • Processor speed is a measurement of what?
    10·1 answer
  • What does a controller control?
    11·1 answer
  • public class Ex0506 { public static void main (String args[]) { int x = 2; while (x &lt; 10) { if (x % 2 == 0) x+=3; else x+=2;
    15·1 answer
  • Given the class definition: class CreateDestroy { public: CreateDestroy() { cout &lt;&lt; "constructor called, "; } ~CreateDestr
    6·1 answer
  • PLEASE HELP! Please dont answer if your going to guess
    14·2 answers
  • Hi I'm new to Brainly anyone wanna be my frnd​
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!