Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Tasks Rainbow colors ask for input of a favorite rainbow color first letter: ROYGBIV Using if , elif, and else: print the color matching the
Tasks
Rainbow colors
ask for input of a favorite rainbow color first letter: ROYGBIV
Using if elif, and else:
print the color matching the letter
Red
Orange
Yellow
Green
Blue
I Indigo
Violet
else print no match"
In : # complete rainbow colors
In : # make the code above into a function rainbowcolor that has a string parameter,
# get input and call the function and return the matching color as a string or no match" message.
# Call the function and print the return string.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started