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
_____ provide the standards, syntax, statements, and instructions for writing computer software
miv72 [106K]
<span>Programming languages provide the standards, syntax, statements, and instructions for writing computer software.
</span>It is a vocabulary and set of grammatical rules. These rules are used for instructing a computer<span> or computing device to perform specific tasks and produce a certain output.</span>
4 0
2 years ago
assume an int array, candy, stores the number of candy bars sold by a group of children wherecandy[j] is the number of candy bar
GuDViN [60]

Answer:

The first one. Important notice sum should be equal to zero before calculating the total sum.

5 0
3 years ago
Read 2 more answers
Briefly define each components of information systems (hardware, software, data, networking, people and procedure). While you ar
WARRIOR [948]

Answer:

1. Hardware is the physical components that compose a system and provide physical quantity and quality to software applications and accomplish information processing tasks

2. Software is a program that carries out a set of instructions written in a programming language. It instructs a computer on how to carry out specific tasks. Programs can be saved permanently or temporarily.

3. Data may be mostly the raw resources used by information systems experts to give business intelligence to users. Traditional alphanumeric data, which is made up of numbers and alphabetical and other characters, is one type of data.

4. Networking is a resource of any computer system connected to other systems via a communications. It refers to the physical connections between all of the network's nodes. Communication networks are a critical resource component of all information systems, according to networking.

5. People are those who are directly or indirectly involved in the system. Direct users include developers, programmers, designers, and system administrators. Direct users can also be the stakeholder or end user who receives an output from the system. Indirect can be a manager who takes a brief check at the system to check that all criteria are satisfied.

6. Procedure is made up of stages or phases that result in an output. A method of continually receiving feedback on each part while analyzing the overall system by observing various inputs being processed or altered to create outputs.

7 0
1 year ago
What is one way to measure technological progress?
OLga [1]
You can measure it by the amount of automatisation. The bigger technological process the easier it is to automate systems.
4 0
3 years ago
When would an absolute cell reference be most helpful?
Aliun [14]

Answer:

The answer is : When there is a need to copy a formula and have the references update based on the new location

Explanation:

<em>I often use this function in any spreadsheet document. Imagine, you have thousands of data in a single sheet. And you inserted one row or column. Normally, you have to update EACH CELL's formula. Imagine the work load and the effort you need to exert. But when the single cell updates all the cell's reference, formula will be affected and you don't need to re update all the cells. It saves you time and effort and worries.</em>

3 0
3 years ago
Read 2 more answers
Other questions:
  • You manage an NLB cluster composed of three servers: Server1, Server2 and Server3. Your maintenance schedule indicates that Serv
    15·1 answer
  • Daniela’s company has made the decision to allow employees to work from home as the company has outgrown their physical space. K
    13·1 answer
  • According to the video, what education and experience do employers look for in Reporters and Correspondents? Check all that appl
    10·2 answers
  • The number of bits per pixel is called what
    7·1 answer
  • (Financial application: compound value) Suppose you save $100 each month into a savings account with the annual interest rate 5%
    8·1 answer
  • Big films with big budgets typically have a few animators working on them. True False
    11·1 answer
  • What resources can be shared over a computer network?
    12·2 answers
  • In GD, what does RWR stands for?
    9·1 answer
  • What is the key difference between a class and an object
    12·1 answer
  • T/F static development is the process of constructing the programs and code modules that serve as the building blocks of the inf
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!