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
Next, determine if the given number is a prime number. A prime number is a number that has no positive divisors other than 1 and
Darya [45]

Answer:

Explanation:

whats the number?

6 0
3 years ago
Simplify the Boolean expression (AB(C + BD) + AB]CD.
finlep [7]

Explanation:

Simplify the Boolean expression (AB(C + BD) + AB]CD.

6 0
3 years ago
Read 2 more answers
Which of the following is not the name of a java wrapper class from the Java API?
11111nata11111 [884]

Answer:

Int

byte

Explanation:

In java there are eight primitive data types has a class dedicated, and then we can find eight wrapper classes, I'm going to let you the next table with the 8 example:

Assume the next table byte and Int are primitive data, the different with byte is only the capital letter Byte.

Primitive Wrapper Class

boolean         Boolean  

byte                 Byte  

char                 Character

int                 Integer  

float                 Float  

double         Double

long                 Long  

short         Short

3 0
3 years ago
AN OBSTACLE OR BARRIER THAT MAY PREVENT YOU FROM ACCOMPLISHING YOUR GOAL IS:
marishachu [46]
Depends on what kind of goal.
If I gave a goal of eating 8 hot dogs then a barrier would be a physical will of your body to not eat more. It would be a limit your body can take so it’s different from a mental or other barrier.
If you wanted to cross an area of land but there is a fence in the way then that’s another type of barrier.
Or there are mental barriers. If you wanted to ask someone out to prom, you may be stopped by a mental barrier of self hatred. Feeling like you’re not good enough.

Hopefully this helps!
5 0
3 years ago
Enables you to temporarily hide all the open windows except the one you are viewing.
solniwko [45]
Minimizing the other windows or full screen the one your looking at with F11 button
7 0
3 years ago
Other questions:
  • You’ve been hired to help with installing cable at a new office building for the local branch of the Social Security Administrat
    14·1 answer
  • Which of the following is not true about managing your privacy settings? (select all that apply)
    9·2 answers
  • By changing the field size for text to the maximum number necessary,
    6·1 answer
  • Your sister is considering purchasing a tablet computer that utilizes RT as the
    11·1 answer
  • What two actions does the RETI instruction perf orm? Why must these two actions be done in a single instruction, as opposed to a
    6·1 answer
  • What type of backlighting receives dc power directly from a motherboard and doesn't use an inverter?
    11·1 answer
  • Write a program, named NumDaysLastNameFirstName.java, which prompts the user to enter a number for the month and a number for th
    13·1 answer
  • What are the three general methods for delivering content from a server to a client across a network
    8·1 answer
  • What is the most efficient<br> form of transportation we<br> have?
    13·2 answers
  • There is overlap in the subjects of study in the different information technology disciplines.
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!