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]
3 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]3 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
From the introductory conversation chip and anna shared, which elements mentioned might suggest the use of case tools?
kari74 [83]

CASE tools are used to boost analyst output, enhance user-analyst collaboration, and incorporate life cycle tasks.

Chip and Anna would communicate with one another and discuss parts of the design that they have finished using CASE tools.

Due to the enormous number of users in a system, CASE tools will help to simplify communication among all users and analysts, therefore this would be helpful to Chip and Anna as well.

They could also employ CASE tools to help them record the data they have obtained from questionnaires, interviews, and document analysis.

Learn more about tool:

brainly.com/question/25860017

#SPJ4

8 0
1 year ago
What is the definition of the components that motherboards, ssds, processors, and cases are part of?
iVinArrow [24]
Necessary carrying components
3 0
3 years ago
Isabella is a security support manager for a large enterprise. In a recent meeting, she was asked which of the standard networki
HACTEHA [7]

Answer:

A. Router

Explanation:

4 0
3 years ago
In computing, a(n) _____ is an attack on an information system that takes advantage of a particular system vulnerability. Select
tensa zangetsu [6.8K]

Answer: d) Exploit

Explanation: Exploit is a type computer attack that successful when the computer system of an user is vulnerable and attacker can do the exploitation. This happens due to the weakness of the system, applications software, network etc.

Other given option are incorrect because exit door,glitch and bad are not any type of attack in the computer field that causes harm to the system.Thus the correct option is option(d).

4 0
3 years ago
How do you enlarge an image to see more detail on it? (1 point)
ra1l [238]

Answer:

Open your image in Photoshop.

Go to the Image Size dialog, check resample, and select "Preserve Details" in the corresponding dropdown menu.

Make sure the Resolution is set to 300 Pixels/Inch.

Set Width and Height to inches and adjust to enlarge your image.

8 0
2 years ago
Read 2 more answers
Other questions:
  • What is basic function of an operating system?
    10·2 answers
  • Which of the following is true of tape? Group of answer choices It is no longer used as a primary method of storage but is used
    10·1 answer
  • Match the spreadsheet features with their respective descriptions.
    9·2 answers
  • Your app needs to store the following information. For each type of information, decide whether you would use an array or a vari
    7·1 answer
  • Me2540 week 5 assignment<br> what do i want to know?
    9·1 answer
  • Write a program that creates a dictionary containing the U.S. states as keys and their capitals as values. (Use the Internet to
    10·1 answer
  • A college has 2.3 ratio of men to women in its student body you what is the ratio of women to men
    15·1 answer
  • output device is any peripheral to provide data and control signal to ab information processing system​
    7·1 answer
  • Who wanna be besties
    8·2 answers
  • Put Your Zom Here If You In Zom
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!