Question: 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..
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. 1 2 user_cycles int(input()) 3 shampoo instructions(user_cycles) Standard Ameri..pdf
Step by Step Solution
3.45 Rating (148 Votes )
There are 3 Steps involved in it
def shampooinstructionsnumberOfCycles if numberOfCycles 1 printToo few elif numberOfCycles 4 printT... View full answer
Get step-by-step solutions from verified subject matter experts
