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.
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.
Chapter3: Data Representation
Section: Chapter Questions
Problem 3RP
Related questions
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.". 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.

Transcribed Image Text:< >
learn.zybooks.com
b Search results for 'Write a function sham...
ży Section 5.7 - IT 140: Introduction to Scri...
B 5-3 Project One Submission - IT-140-J6...
B Project One Guidelines and Rubric - IT-1...
My Courses
= zyBooks My library > IT 140: Introduction to Scripting v3 home > 5.7: Functions with branches/loops
E zyBooks catalog
? Help/FAQ
8 Victoria Thibodeaux
CHALLENGE
5.7.2: Function with loop: Shampoo.
АCTIVITY
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.
247772.1992070.qx3zqy7
1 def print_popcorn_time(bag_ounces):
if bag_ounces < 3:
print("Too small")
if bag_ounces > 10:
print("Too large")
2
1 test
passed
3
4
5
All tests
6.
else:
passed
7
print(str(6 * bag_ounces)+
seconds")
8
9 user_cycles
10 shampoo_instructions(user_cycles)
int(input())
Run
X Test aborted
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 2 images

Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you

Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage

C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning

Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage

C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning

Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,

Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning

C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr