nobodydml
nobodydml nobodydml
  • 03-01-2022
  • Computers and Technology
contestada

Python question 4.2: Question 2

Python question 42 Question 2 class=

Respuesta :

aayu0302
aayu0302 aayu0302
  • 03-01-2022

Answer:

n=1

while True:  

   i=input("What pet do you have? ")

   if i=="rock":

       break

   else:

       print("You have a " + i + " with a total of " + str(n) + " pet(s)")

       n=n+1

Answer Link

Otras preguntas

Solve for w . =−40−w6 Simplify your answer as much as possible.
Which is heavier 100 pounds or ROCKS! or a 100 pounds of feathers? Only the smartest will get this right so I will give 20 points.
Why is the difference of 2 odd numbers always even?
What role did the British monarchy play in India after 1857?
Elliot is having trouble listening effectively in his political science class. usually he listens well in class, but the professor in this case has been present
Use the quotes from the passage to determine how Amak's character is revealed through the text. "Amak, whose stomach growled, knew his family was famished—and s
Consider the pseudo-cpu discussed in class. the instruction format is 16 bits, which is subdivided into 4-bit opcode field and 12-bit addressing field
What is the ability to adjust and maintain a stable internal environment?
Within the atmosphere, as altitude increases...... air pressure stays the same. air becomes heavier. air pressure increases. air pressure decreases.
identify 3 powers a president has after a bill has passed both houses of congress