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
To rename a worksheet, you change the text on the ? HELP ASAP
prohojiy [21]
If this is Excel, it would be C. Sheet tab
5 0
2 years ago
Eric is adding three more slides to his PowerPoint presentation. He knows he wants one of them to have only a large text box, th
marissa [1.9K]

The buttons depend on what version of MS Office he is using. Assuming Eric is using Powerpoint 2013, he must press the following: 

1st Slide: Insert > New Slide > Title Only

2nd Slide: Insert > New Slide > Comparison > Click on "Pictures" icon > Browse > Click selected picture > Insert > Delete text box saying "Click to add title" > Insert another picture using same procedures above > Add captions

3rd slide: Insert > New Slide > Two Content > <span>Click on "Picture" icon > Browse > Click selected picture > Insert 3 more pictures > Click textbox "Click to add title" </span>

3 0
3 years ago
A database is used to _____.
Cloud [144]
A database is used to organize a large collection of data, hence the name database. It is literally a base that would contain a chunk of data that a person or an organization will need to pull out later when they need it. Databases are usually used by companies or organizations
5 0
3 years ago
Read 2 more answers
Which activity is a case of identity theft
dezoksy [38]
<span>Criminal identity theft (posing as another person when apprehended for a crime)Financial identity theft (using another's identity to obtain credit, goods and services)Identity cloning (using another's information to assume his or her identity in daily life)Medical identity theft (using another's identity to obtain medical care or drugs)<span>Child identity theft]


cite: wikipedia</span></span>
4 0
3 years ago
Read 2 more answers
Slide rule was the first mechanical calculator. true or false​
drek231 [11]

Answer:

False. Pascal's calculator was the first mechanical calculator invented by Blaise Pascal in the mid 17th century.

7 0
3 years ago
Read 2 more answers
Other questions:
  • Under the ____________________, federal agencies must 1) review their IT systems for privacy risks, 2) post privacy policies on
    12·1 answer
  • what is it called when you are biying and selling products via electronic channels such as the internet​
    13·2 answers
  • What is out put.what is data. what is microprocessor
    14·1 answer
  • Write a program that takes the radius of a sphere (a floating-point number) as input and then outputs the sphere’s: Diameter (2
    7·1 answer
  • Write a program that will add up the series of numbers: 99,98, 97...3.2.1. The program should print the running total as well as
    9·1 answer
  • Which technology concept uses computer resources from multiple locations to solve a common problem?
    11·2 answers
  • Students who finish their homework after school are meeting a. intrapersonal and short-term goals b. normative and short-term go
    13·2 answers
  • Privacy Group of answer choices must be respected if we are to function as complete, self-governing agents is an absolute value
    5·1 answer
  • What types of printed information are useful to obtain from your target employers?
    5·1 answer
  • The field names in a database are also known as__?
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!