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
Nesterboy [21]
4 years ago
7

Write a function shampoo_instructions() with parameter num_cycles. If num_cycles is less than 1, print "Too few.". If more than

4, print "Too many.". Else, print "N : Lather and rinse." num_cycles times, where N is the cycle number, followed by "Done.". Sample output with input: 2 1 : Lather and rinse. 2 : Lather and rinse. Done.

Computers and Technology
1 answer:
Rashid [163]4 years ago
3 0

Answer:

The code written in python and fully commented for this question is given below:

# Create the function shampoo_instructions with the num_cycles parameter input

def shampoo_instructions(num_cycles):

   # Condition if is less than 1, print too few

   if num_cycles < 1:

       print("Too few.")

   # Condition if is greater than 4, print too many

   elif num_cycles > 4:

       print("Too many.")

   # If is in inclusive range [1,4], print the Lather and rinse cycle

   else:

       # Create a for loop to print rinse cycle

       for i in range(num_cycles):

           print("{}: Lather and rinse.".format(i+1))

   # Print an end string for each execution

   print("End-------------------------------------")

# Call the function with all the conditions tested

shampoo_instructions(3)

shampoo_instructions(0)

shampoo_instructions(4)

shampoo_instructions(5)

Explanation:

I attach an image that contains the output of the execution and the source code.

You might be interested in
How should a common data source, like social media comments, be categorized
Masja [62]

Answer:

unstructured data

Explanation:

Sources that are likely to give you unstructured data might be: Social media posts

4 0
2 years ago
If a user has just added a simple triangle shape into a diagram, how can the triangle be adjusted? Check all that apply. by maki
lesantik [10]
The first two make the most sense.
I hope this helps!
7 0
3 years ago
Read 2 more answers
John would like to move from the suburbs into the city, but the rent in the city is very high. John has found an apartment he re
maxonik [38]

A list of multiple choices is given;

<span>a)      </span>Purchase a home in the city center instead.

<span>b)      </span>Rent the apartment anyway.

<span>c)       </span>Rent the apartment with a roommate.

<span>d)      </span>Purchase a home in the suburbs instead.


The answer is (C)


John should look for an apartment and share it with a roommate. This will bring down rent expenses to 50% as both John and the roommate will be cost sharing the rent. If the rent expenses go down by 50%, he’ll be able to save an additional 10% and use it for other expenses.

4 0
3 years ago
What analysis tool would you use to analyze the behaviour of new customers vs. returning customers on your website?
Bumek [7]

Answer:

Segmentation

Explanation:

The analysis tool that could be used to analyze the behavior of new consumers v/s returning consumers on the website.

Segmentation is a process that allows us to isolate the data or its subsets into different segments on the basis of personal traits, age, behavior , income, etc in order to analyze and examine so as to provide a correct response to the trends in the business such as particular advertisement to a particular group in order to get their attention to the current trends.

5 0
4 years ago
Jenifer wants to add some more hardware to her computer system. If she is adding a video card and a sound card, what must she us
ruslelena [56]

Answer:OA

Explanation:  expansion slots, the cards need to slide into the slots to become installed in the back of her pc.

3 0
1 year ago
Other questions:
  • _ are typically comprised of a mix of _ and _
    11·2 answers
  • Which of the following is NOT a search engine ( Bing, Yahoo, Ask, Twitter)
    6·2 answers
  • A raised dot (ú) shows where the ENTER key was pressed. <br> a. True<br> b. False
    15·1 answer
  • how to make assignment on power point plz cntct me and help me all about power point and my assignment is prime ministers of pak
    13·1 answer
  • What process makes one group a member of another group? nesting cloning copying grouping
    8·1 answer
  • In the context of wireless signal propagation, the phenomenon that occurs when an electromagnetic wave encounters an obstruction
    14·1 answer
  • If Digital Assistants are free to use why companies do spend millions of dollars to develop and support them?
    8·1 answer
  • A discription of how child abuse displays itself on social media​
    6·1 answer
  • What is the definition of a performance, such as a poetry reading? O A. A work of art installed in public OB. A presentation of
    14·1 answer
  • 2ND LAST QUESTION
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!