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
A student is conducting an experiment in which he adds an inhibitor to an enzyme-catalyzed reaction that contains alkaline phosp
Zigmanuir [339]

Answer:

competitive

Explanation:

An inhibitor is a substance that hinders the action of an enzyme. An inhibitor may be competitive or non competitive.

A competitive inhibitor is an inhibitor that is very similar to the substrate hence it binds to the enzyme instead of the substrate. A noncompetitive inhibitor binds to a site that is different from the active site. This site is called an allosteric site.

If we look at the experiment described in the question, the reaction rate decreases upon addition of the inhibitor. This effect is reversed by adding a large quantity of substrate.

The implication of this observation is that the enzyme and the inhibitor compete for the active site on the substrate.

Hence the inhibitor is a competitive inhibitor.

7 0
3 years ago
For a list of numbers entered by the user and terminated by 0, find the sum of the positive number and the sum of the negative n
Katena32 [7]

Summarize all positive numbers as follows: + It's good. The total of all negative numbers is:, write it down. + Unfavorable.

<h3>What is C++ language?</h3>

C++ language is defined as a general-purpose programming language that supports procedural, object-oriented, and generic programming and is case-sensitive and free-form.  As well as being used for in-game programming, software engineering, data structures, and other things, C++ is also utilized to create browsers, operating systems, and applications.

An application that adds all positive integers and stores them in variables, as well as adding all negative numbers and storing them in variables. The software should print the values for both variables at the conclusion and compute their average. When the user enters a zero, the software should terminate.

Thus, summarize all positive numbers as follows: + It's good. The total of all negative numbers is:, write it down. + Unfavorable.

To learn more about C++ language, refer to the link below:

brainly.com/question/1516497

#SPJ1

8 0
1 year ago
Dwayne wants a variable called "name" to appear in the interpreter and does not want a space after it. Which of these should be
ICE Princess25 [194]

Answer:

name + name

Explanation:

When assigning values to a Variable  in python, the + operator sums the values assigned to the variable into a single value hence there won't be any space between the values assigned .

Name + Name = NameName    in python programming

7 0
3 years ago
Which online resource is usually not free?
Andrej [43]

Answer:

educational tutoring

Explanation:

7 0
3 years ago
Read 2 more answers
_________ involves encouraging employees to engage in behaviors directly related to goal accomplishment.
lianna [129]
Planning involves encouraging employees to engage in behaviors directly related to a goal accomplishment. It is the best way to have excellent performance because it motivates the employees to work harder. Planning involves goal setting, objectives, and determining the course of action to achieve the goal.
5 0
4 years ago
Other questions:
  • Speaker,printers, and monitors are all considered what?
    10·2 answers
  • What allows windows to quickly be resized by clicking the title bar of the window and dragging it to the top, sides, or middle o
    9·1 answer
  • A graphic design student is putting the finishing touches on her PowerPoint presentation for her speech. She is carefully analyz
    12·1 answer
  • When you right-click a word with a red squiggly line under it, which of the following displays?
    12·2 answers
  • The standard toolbar appears whenever you select text.
    5·1 answer
  • Help me with Java Coding, I don't know what I am doing wrong in driver class. Please fix in Java and upload.
    14·1 answer
  • System A has two processors. Program X takes 50 seconds to execute on one of the processors. Program Y takes 50 seconds to execu
    8·1 answer
  • A part-time job performed while in high school must have the approval of your school counselor.
    7·2 answers
  • What are the different steps while solving a problem using computer? explain​
    7·1 answer
  • Uinjsiodj9fijsdiokjdwe0okakj09dw9j09jw09
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!