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

Summarize the course of wwii in the pacific from 1942 through 1945.
You deposit $4000 in an account earning 7% interest compounded continuously. How much will you have in the account in 10 years?
. How many liters of NH3, at STP, will react with 7.4g O₂? 4NH3(g) +702(g) → 4NO2(g) + 6H₂O(g) 22
Activity 2. Read this feature article carefully. Answer the questions indicated below and write them on a separate sheet of paper. The Looks...Make Me Different
Dominick earned $7.25 per hour until his state raised the minimum wage to $12 per hour, at which time his pay was increased to $12. Which law is the organizatio
A 2 W 1) 115* 54° 2v+1°​
i can figure out 12 is greater than four times a number g
PLEASE ASAPPP 50 POINTS
A rock is dropped from a garage roof from rest. the roof is 6.0 m from the ground. determine the velocity of the rock as it hits the ground.
Which of the following is NOT a way to represent the following sequence:an = 14, 18, 22, 26, 30.... A) an = 10 + 4nB) a1 = 10, an = an + 4C) an = 14 + 4(n-1)D)