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]
3 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]3 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
The hardware to keep the output data when finished is a
Bess [88]
I believe the answer is modem
4 0
3 years ago
The causes of making computer virus​
sasho [114]

Answer:

Damage and chaos. ...

An ego stroke. ...

Monetary or information gain. ...

Stealth. ...

Prevention.

To take control of a computer and use it for specific tasks.

To generate money.

To steal sensitive information (credit card numbers, passwords, personal details, data etc.)

To prove a point, to prove it can be done, to prove ones skill or for revenge purposes.

To cripple a computer or network.

Explanation:

5 0
3 years ago
Read 2 more answers
Why is time management considered a soft skill
FinnZ [79.3K]
This is due to the simple fact that time management helps you not only get things done for yourself, but also not get in the way of others and let them get things done for themselves. It's like working in harmony.

Hope this helps! <3
5 0
3 years ago
Read 2 more answers
It's the same drop-down answers for both.
tia_tia [17]

Answer:

First, medium: can see all the subject but maintain the focus in him

Second, close-up: To se the facial expressions and emotions

5 0
3 years ago
What is a megavirus in computing
g100num [7]

Answer:

tbh I have no clue.

Explanation:

8 0
2 years ago
Read 2 more answers
Other questions:
  • Match the tool to its description.
    15·1 answer
  • How is a Personal Fact Sheet used? a. A Personal Fact Sheet is a tool used to market yourself and build your network b. A Person
    13·2 answers
  • Binary is best interpreted by a computer because?
    8·2 answers
  • Which of these statements describes the difference between binary and decimal numbers?
    11·2 answers
  • In Alphatech Systems, email software screens incoming messages by organizing them into mailboxes and identifying junk mail. As a
    13·1 answer
  • Assume you are a network consultant for a company that is designing a private WAN to communicate between five locations spread t
    10·1 answer
  • Complete the below method, isPalindrome(), that takes in a String and returns a boolean. The boolean should be true if the Strin
    7·1 answer
  • List the difference between GIGO and bug ​
    15·1 answer
  • Generally speaking, what is a “best practice"?
    13·1 answer
  • Is pseudocode obtained from Algorithm or is Algorithm obtained from pseudocode?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!