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
Laptop computers, personal digital assistants, and cellular phones were all readily accepted and diffused in U.S. markets where
astra-53 [7]

Answer: Compatibility

Explanation:

 According to the question, the given products are offering compatibility with the customers needs and the priorities of the consumers. The customers comparability means the degree of the product that fit between customers expectation and the capability of serving by the operation team.

The customers expectation mainly reflected both the present and the past evaluation of the products and the user experience. The compatibility of the customers needs is to meet the quality, value  and the service of the product.

8 0
3 years ago
When you assign a value of one data type to a variable of another data type, Visual Basic attempts to perform ________ type conv
sweet [91]

Answer: implicit

Explanation:

When a value of one data type is assigned to a variable of another data type, then Visual Basic attempts to perform an implicit type conversion.

Implicit type conversion, simply refers to when one data type is converted automatically by Python to another data type. It should be noted that no user involvement is needed.

6 0
3 years ago
A restaurant owner wants to use a database to help his business. What would be a good thing for him to do first?
arsen [322]
C Ask himself what his purposes will be for using a database. You have to figure out the basics first
5 0
3 years ago
Read 2 more answers
Sandra has composed a draft of her essay in Microsoft Word. She now wants to revise the essay. Which tool can she use to store t
d1i1m1o1n [39]

Answer:

she can use Ctrl S then open it again

Explanation:

i hope this helps and please mark as brainliest

4 0
3 years ago
Pleas help with this question: Which statement about word processing software is true?
deff fn [24]
Short Answer C

The Primary use of any word processor is to create word documents (like this editor) with the ability to format it with bold letters or <u>underlining</u> or <em>italics</em>. There are many other choices of things to do. All your choices are true but the main one is the third one down.

It can do very simple mathematical calculations if it can create tables (neither of which is possible with this editor. A is incorrect.

D is mostly incorrect. Very few word processors have built in capabilities that would help you with word games. There are some that do. Most don't.

I would hate to create fonts using a word processor. It's remotely possible, but anyone in his right mind would try using a program designed for that.. B is incorrect.
8 0
4 years ago
Other questions:
  • While browsing through the mall, you are given samples of the latest perfumes from different designers. This is an example of wh
    14·1 answer
  • "write a program that reads two floating point numbers and prints their sum difference and product."
    13·1 answer
  • The page orientation in which the page width is greater than the page height is called
    8·1 answer
  • What is a benefit of the Name Manager feature?​
    12·2 answers
  • Code the function definition for aNonclassFunction, picking up co. aNonclassFunction has no return value.
    8·1 answer
  • Biểu diễn cây sau bằng mảng một chiều
    12·1 answer
  • Do earthquakes ever happen in Malaysia?​
    8·1 answer
  • Here is the model I’m working on and can’t figure it out this model shows the basic process of making a protein what are the str
    14·2 answers
  • Question 1(Multiple Choice Worth 5 points)
    9·2 answers
  • a radio frequency identification (rfid) tag provides a generic identification for a credit or debit card carrying the tag.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!