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
serious [3.7K]
2 years ago
9

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. Hint: Define and use a loop variable.
Computers and Technology
1 answer:
Masteriza [31]2 years ago
7 0

Answer:

See explaination

Explanation:

#Run the code in the python version 3.x.

#Define the function.

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)

You might be interested in
When would it be necessary to shoot in 4K according to the presentation?
Nataly_w [17]

Answer:

because it provides you a lot of storage and the post production equipment to handle it and it is used to do big projects

Explanation:

so l know this much it is correct please mark me brainllest

6 0
2 years ago
Where do you place the title tag in HTML​
makkiz [27]

Answer:

The title tag is basically your saved document

Save as and poof

High Hopes^^

Barry-

5 0
2 years ago
You have just assembled your first PC. You hit the power button and the computer turns on. As the computer runs through POST, it
Paha777 [63]

Answer:

Explanation:

If the HDD is spinning, this means that the power cable is correctly connected and that the drive is receiving power and powering on. However, this does not mean that the HDD is functioning correctly and reading the information. Therefore, the next logical step would be to check the SATA cable that connects the drive to the motherboard. The cable may be broken or maybe the SATA slot on the motherboard. Switch out the cables and plug it into another slot. If this does not work, then it may be that the HDD is broken. Multiple Beeps can also mean that the RAM or CPU is not plugged in correctly or broken.

6 0
3 years ago
Which device performs the function of determining the path that messages should take through internetworks?.
bija089 [108]

Answer:

A router

Explanation:

8 0
2 years ago
What did you predict will happen? Check all that apply. The lioness will attack Thisbe. Thisbe will stay hidden in the cave to a
sesenic [268]

Hi,


Everything applies. It is impossible to predict based on the current data. All scenarios are possible with equal possibility.


Hope this helps.

r3t40

5 0
3 years ago
Read 2 more answers
Other questions:
  • What happens when two computers use the same IP address?
    6·1 answer
  • If you do not specify any criteria in a delete query, Access will delete all the records in the table. Truth or False
    11·1 answer
  • What term is used to refer to the requesting of information from a database?
    10·2 answers
  • In a three-tier architecture, the component that runs the program code and enforces the business processes is the:_______.
    11·1 answer
  • Write a program that allows the user to continuously input the value n until a negative number is entered
    10·1 answer
  • One student will be stationed near you in a coffee shop. The other student will be located two miles away from your school. You
    10·2 answers
  • Why was the tesla model s help change the was we see EV
    12·1 answer
  • Challenge activity 1.11.1: using constant in expression is not working for me. Can any one help me find the right code?
    12·1 answer
  • Ok i dont wanna get bannddddddd so i have to ask a qustion<br> 2 plus 2
    8·2 answers
  • Yaaaaaa.........
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!