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 trench is a narrow excavation in which the depth is greater than the width and the width does not exceed 15 feet. A. False B.
Arturiano [62]
I think it is false
4 0
3 years ago
Read 2 more answers
Name and describe the two (2) broad categories of files
fenix001 [56]
If it’s computer files, that would be System Software and Application software.

“The System Software is the programs that allow the computer to function and access the functionality of the hardware. Systems software sole function is the control of the operation of the computer.

Applications software is the term used for programs that enable the user to achieve specific tasks such as create a document, use a database or produce a spreadsheet.”
8 0
3 years ago
Crash proof cars... do you have any idea on how to improve this idea
AURORKA [14]
The suspense and reaction time of the car . So for example if a car pulled out suddenly and was about to hit you, you could make the car so it functionally knows how to react
7 0
3 years ago
Read 2 more answers
You were discussing software piracy with a friend and were surprised to learn how software piracy can impact your life every day
Vika [28.1K]
Those who use pirate software:
<span>1)Increase the chances that the software will not function correctly or will fail completely
2)Forfeit access to customer support, upgrades, technical documentation, training, and bug fixes
3)Have no warranty to protect themselves
4)Increase their risk of exposure to a debilitating virus that can destroy valuable data
5)May find that the software is actually an outdated version, a beta (test) version, or a nonfunctioning copy
6)Are subject to significant fines for copyright infringement</span>
5 0
3 years ago
BITS wants to store information about the supervisors, including their supervisor number and the relationship to consultants. Su
Olin [163]

Answer:

Convert the table into normalize form

Explanation:

Un normalized relation of the given schedule is as

Consultant ( ConsultNum, Last Name, First Name, Street, City, ZipCode

HoursRate (SupervisorNum, Supervisor Num)

(Tasks, Description, Catagory, Price, SupervisorNum))

According to these functional dependencies :

SupervisorNum is dependencies of the SupervisiorNum

ConsltNum is dependencies of the Last Name, First Name, Street, City, ZipCode, Hours, Rate

Tasks are dependencies of Description, Category, Price

The consultant table is not in a normalized form as it contains repeating groups. Make composite keys such as Supervisor Num, Tasks and ConsltNum and convert the table in NF by removing repeating groups

Such as table in NF

Consultant

(Consult Num, Last Name, First Name, Street, City, Zip Code, Hours, Rate

Supervisor Num, Supervisor Name, Tasks, Description, Category, Price)              

5 0
3 years ago
Other questions:
  • The adjustable contact of a potentiometer is placed at the center of its adjustment. If the total resistance is 5 kOhms, what is
    9·1 answer
  • Driving while wearing headphones or earphones
    12·2 answers
  • The desktops of computers running the same OS all look the same
    8·1 answer
  • After an informative session, you find yourself with several pages of notes. For maximum retention and understanding, you should
    6·1 answer
  • Explain three applications of data mining
    14·1 answer
  • Which are Career and Technical Student Organizations? (Check all that apply.)
    12·1 answer
  • I love dog my is 16 weeks old how old is yours
    12·1 answer
  • Hide Time Remaining A
    11·1 answer
  • Hich of these statements is a value statement?
    14·2 answers
  • Identify the calculation performed by the following code.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!