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
Westkost [7]
3 years ago
14

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
Computers and Technology
1 answer:
Mama L [17]3 years ago
7 0

Answer:

def shampoo_instructions(num_cycles):

   #Check the cycles to be greater than 1.

   if num_cycles < 1:

     

       #Display the statement.

       print('Too few.')

     

   #Check the cycles to be greater than 4.

   elif num_cycles > 4:

     

       #Display the statement.

       print('Too many.')

     

   #The else part.

   else:

     

       #Initialize the variable.

       N = 1;

         

       #Begin the for loop.

       for N in range(N, num_cycles+1):

         

           #Print the result.

           print(N , ": Lather and rinse.")

         

       #Print the statement.

       print('Done.')

#Call the function.

shampoo_instructions(2)

Explanation:

You might be interested in
A stack is initially empty, then the following commands are performed: push 5, push 7, pop, push 10, push 5, pop, which of the f
MatroZZZ [7]

Answer:

d

Explanation:

6 0
4 years ago
Software is:
irakobra [83]
I think the answer is A
7 0
3 years ago
This graph shows a relationship between the height of a giraffe and its weight which term describe the dashed line through the g
Nadusha1986 [10]

Answer: The Answer is C

Explanation: This is because It is mainly controlled by genetics and we can not manipulate genetics.

4 0
4 years ago
Read 2 more answers
((11111111-1011100) X (10100 / 10))- ( 110010000+ 1110011)
dsp73

Answer:

10089891099

Explanation:

?

3 0
3 years ago
A two-dimensional array of ints, has been created and assigned to a2d. Write an expression whose value is the number of rows in
Contact [7]

Explanation:

oi.........................

7 0
3 years ago
Other questions:
  • Computers spend most of their time in loops, so multiple loop itera- tions are great places to speculatively find more work to k
    10·1 answer
  • Steps needed to deposit cash on cash deposit machine
    6·1 answer
  • To add and remove chart elements, you can use the add chart element button in the charts layout group on the ____ tab.
    6·1 answer
  • A patient presents at an outpatient urgent care facility with an acute illness and is seen by a provider. A detailed history wit
    13·1 answer
  • A lamp outside a front door comes on automatically when it is dark, and when someone stands on the doormat outside the front doo
    7·1 answer
  • Which of the following is true of the poka-yoke approach used for mistake-proofing processes?
    9·2 answers
  • What is the best stratiget to avoid paying intrest in your credit cared
    13·1 answer
  • Who invented the Bluetooth device​
    12·1 answer
  • (Java) Write a program that accepts a number of minutes and converts it both to hours and days. For example, 6000 minutes is 100
    10·1 answer
  • Which arcade game, released in 1972, is considered to be the first to be commercially successful?.
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!