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
frosja888 [35]
3 years ago
12

Write a loop that continually asks the user what pets the user has, until the user enters "rock", in which case the loop ends. I

t should acknowledge the user in the following format. For the first pet, it should say "You have a dog with a total of 1 pet(s)" if they enter dog, and so on.
Sample Run:
User enters:
lemur parrot cat rock
Outputs:
You have a lemur with a total of 1 pet(s)
You have a parrot with a total of 2 pet(s)
You have a cat with a total of 3 pet(s)
Computers and Technology
1 answer:
DedPeter [7]3 years ago
7 0

Answer:

Check the explanation

Explanation:

The Python program that frequently asks the user what pets the user has,

until the user enters "rock", in which case the loop ends can be analysed in the written codes below.

'''

# count of pets

count = 0

# read the user input

pet = input()

# loop that continues till the user enters rock

# strip is used to remove the whitespace

while pet.strip() != 'rock':

  # increment the count of pets

  count += 1

  # output the pet name and number of pets read till now

  print('You have a %s with a total of %d pet(s)' %(pet.strip(),count))

  pet = input() # input the next pet

#end of program

You might be interested in
Eugene wants to indent a paragraph, but the ruler is not present. Which tabs could Eugene use in order to accomplish his goal?
Anettt [7]

Answer:

The answer is "View and page layout."

On google docs, you can click 'tab' on the keyboard to indent a paragraph. I don't know if that's the same on all software though.

hope this helps

7 0
3 years ago
You are contacted by a project organizer for a university computer science fair. The project organizer asks you to hold a forum
Usimov [2.4K]

Answer:

Note this:

Nothing beats an open market community!

See below the explanations.

Explanation:

Linux Operating system was created in the early 1990s by Finnish software engineer "Linus Torvalds" and the Free Software Foundation.

1. Why choose Linux over windows.

2. Linux strength.

3. Linux concept.

3 0
3 years ago
You are setting up a small network. The customer has decided to change his internet service provider (ISP) to EtherSpeed. The IS
salantis [7]

Home pc1 becouse it is the right one

3 0
3 years ago
What are the 6 external parts of a computer
Sedbober [7]

External computer components connect to the motherboard through a series of ports on the computer case. Many components have their own dedicated port connections, such as those to connect audio equipment or the computer monitor. Others may share a single type of connector, such as the USB, that connects everything from keyboards and mice to game pads and external hard drives. there


8 0
3 years ago
The two mathematical models of language description are generation and recognition. Describe how each can define the syntax of a
JulijaS [17]

Answer:

The correct answer to the following question will be "Semantic and Syntax error".

Explanation:

<u>Syntax error: </u>

Corresponds to such a mistake in a pattern sentence structure that is composed in either a specific language of that same coding. Because computer programs have to maintain strict syntax to execute appropriately, any elements of code that would not adhere to the programming or scripting language syntax can result inside a syntax error.

<u>Semantic error: </u>

That would be a logical error. This is because of erroneous logical statements. Write inaccurate logic or code of a program, which results incorrectly whenever the directives are implemented.

So, it's the right answer.

3 0
3 years ago
Other questions:
  • When an architect designs a building, what visual design elements could be used to help capture a viewer’s attention? A) The use
    5·2 answers
  • PLEASE HELP!!!!! MUCH OBLIGED!!!!
    15·1 answer
  • Through the use of a _____ system, information on prospective, current, and past customers is stored and analyzed for future pla
    15·1 answer
  • Which of the following is NOT a fixed expense?
    6·1 answer
  • technology might not possess emotional intelligence but it can certainly influence ours. how have technological changes affected
    7·1 answer
  • A score of 3 or better on the exam administered at the end of which type of course usually means that you will earn college cred
    6·1 answer
  • Intelligence is to creativity as _____ is to _____. Group of answer choices spatial intelligence; musical intelligence correct t
    15·1 answer
  • Explain software piracy and Hacking​
    13·2 answers
  • According to Chargaff's data, ________ must pair with ________, and ________ must pair with ________.
    8·1 answer
  • Dion Training has hired you to assess its voucher fulfillment web application on its e-commerce website. The web application rel
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!