4.2 code need help plz someone 15 points if u help

4.2 Code Need Help Plz Someone 15 Points If U Help

Answers

Answer 1

def func():  

 total = 0

 while True:

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

   if pet == "rock":

     return

   total += 1

   print("You have a {} with a total of {} pet(s)".format(pet, total))

func()

We wrapped our code in a function so that whenever the user enters rock, we can simply return and exit the function. If you have any other questions, I'll do my best to answer them.


Related Questions

Which of the following would be appropriate to create using the CMYK color model?

Select all that apply.

a printed takeout menu a printed takeout menu , ,

a photography blog a photography blog , ,

a tri-fold brochure a tri-fold brochure , ,

a mobile app logo

Answers

Answer:

B, and C

Explanation:

they look like the only two answers that make sence

How would you reply to an email message you've received that has multiple recipients, all of whom you would like to see your reply?

Answers

Answer:

depends on the app. if it's in google you can hit the reply all button and that will send the reply to all people or you can copy the email addresses from the original email into a new email

Answer:

the answer is c :D

Explanation:

How do I do these? I dont understand.

Answers

I don’t understand either, I would suggest contacting your teacher or maybe searching up videos or tutorials on how to solve such a problem.

One of the primary principles of the Rapid Application Development methodology is early prototyping of the _______ in the development cycle

Answers

Answer:

Software Applications

Explanation:

Rapid Application Development (RAD) also is an agile project management strategy used in the development of software. RAD is also referred to as Rapid Application Building (RAB).

Its greatest advantage is that it reduces the time taken to churn out a program and this is why a lot of developers are now adopting it.

This is made possible by reducing the amount of time and effort spent on planning and increasing the amount of energy spent on creating prototypes.

Other merits of this methodology are:

It reduces the risk associated with the project by ensuring that the program is first used as a prototype rather than the real deal. It ensures better quality. When users interact with the prototypes, they are able to provide very useful feedback that goes back into development to enhance the quality of the project.

Cheers!

PLzzzzzz help me!! I will mark brainiest to the one who answers it right!!
Answer it quickly!!

Write a pseudo code for an algorithm to center a title in a word processor.

Answers

Answer: abstract algebra

Explanation: start with the algorithm you are using, and phrase it using words that are easily transcribed into computer instructions.

Indent when you are enclosing instructions within a loop or a conditional clause. ...

Avoid words associated with a certain kind of computer language.

Answer:

(Answers may vary.)

Open the document using word processing software.

In the document, select the title that you want to center. The selected word is highlighted.

On the Menu bar, select the Format tab.

In the Format menu, select Paragraph.

The Paragraph dialog box opens with two sub tabs: Indents and Spacing, and Page and Line Breaks. The first tab is selected by default.

Adjust the indentation for the left and right side. Ensure that both sides are equal.

Preview the change at the bottom of the dialog box.

Click OK if correct, otherwise click Cancel to undo changes.

If you clicked OK, the title is now centered.

If you clicked Cancel, the title will remain as it is.

Explanation:

I took the unit activity

Write a multi-way if statement that compares the double variable pH with 7.0 and makes the following assignments to the bool variables neutral, base, and acid:

Answers

Answer:

try:

   pH = float(input("Enter number between 0 to 14: "))

except ValueError:

   print("input must be a number")

if pH < 7:

   print("pH is Acidity")

elif pH == 7:

   print("pH is neutral")

else:

   print("pH is Base/alkaline")(

Explanation:

The try and except statement is used to check if the input is a number, if its not, the print statement is displayed. The nested if statement compares the pH input to know if it is an acid, base or neutral.

What is payload?
a block of data inside the packet
a block of data transmitted across a network
the maximum amount of data a network can transmit
a 32-bit numeric address

Answers

Answer:

a block of data inside the packet

Other Questions
a bicycle had a listed price of $607.98 before tax. if the sales tax rate is 8.25% find the cost of the bicycle with sales tax included. round your answer to the nearest cent if necessary What does esperanza give isabel after hearing the news what is the solution to this problem? 2x+3(x-10)=45 Which are the qualifications of both the governor and lieutenant governor? Check all that apply. natural born citizen at least 30 years old Georgia resident for at least 10 years Georgia resident for at least six years US citizen for 15 yearsplease help quick first right answer gets brainlist Which is the fastest way to make many formatting changes to a range of cells?select each cell, right-click, use the ribbon to make changesselect the range, right-click, use the ribbon to make changesselect the range, right-click, format cells, make changesselect each cell, right-click, format cells, make changes Bob baked 175 brownies to give seven of his friends if he splits the brownies evenly and keeps none for himself how many brownies will each friend get A hiker climbed up from the bottom of a mountain. His elevation increased at a rate of 25 feet each hour.Which equation models the change in his elevation at 5 hours? GIVING BRAINLIEST IF FAST AND CORRECT ANSWER!!!!!!!! Um I dont really understand math. But I have a test and I need to. know what is the least common multiple of 15 and 45 but can u show your work plz and thank you 12. Compare and Contrast the relationships between the speed of electromagneticand mechanical waves as they travel through different mediums. YOU mustwrite at least 8 sentences. Write out the C Major Scale one octave ascending and the C Major arpeggio one octave ascending. Rearrange the area formula to solve for |A=lw The answer choices are A) Which is more important: the brain or the heart? Explain your reasoning. Silver (Ag) has 47 protons in each atom. Based on this information, which of the following also describes an atom of silver? A. It has no neutrons. B. It has 47 electrons. C. It has 23 neutrons and 24 electrons. D. It has a total of 94 neutrons and electrons. it science by the way. 13. Jonas is riding his bicycle at 18 kilometers per hour, and he has already ridden for 40 kilometers. (6, 148) plese helppleseplese PLS HELP!!! WILL MARK BRAINLIEST TO FASTEST AND CORRECT PERSON! GIVE AN EXPLANATION ALSO IN ORDER TO RECIEVE BRAINLIEST!!!Which of the following is a grievance from the Declaration of Independence?A. Colonists born in America were prohibited from holding elected officeB. Colonists were forced to quarter troops in their homesC. Colonists were not eligible to become officers in the British ArmyD. Colonists were required to serve a year in the colonys militia It takes 6 cubes to build a staircase with 3 steps. How many cubes will be needed for 11 steps?Pls show work A map of the changing center of U.S population shows increased migration to the South in the last 60 years. What hypothesis for this movement is most likely? Which type of government handles the needs of most small communities in New England?countystatetownshiptown