Answered step by step
Verified Expert Solution
Question
1 Approved Answer
python Problem #1 Problem #5 Revisit the MixColors s Take your answer from Week 3 Wednesday for the MixColors program. We will split this into
python
Problem #1 Problem #5 Revisit the MixColors s Take your answer from Week 3 Wednesday for the MixColors program. We will split this into methods. Write a program named ColorFunction that does exactly the same thing but has the following three functions: * main(): This function will ask the user to enter two primary colors, and pass these values to the function mixColors(). It will then accept a return from mixColors(). *mixColors(): This function accepts two primary colors and determines the created secondary color. This color is returned. If it was not valid, return the string "not valid". "printValue(): This void function accepts a single string of the secondary color or "not valid" and prints the color or the message "You did not enter two primary colors". Sample Output Run #1 Enter the first primary color (small letters): red Enter the second primary color (small letters): blue You will get purple Sample Output Run #2 Enter the first primary color (small letters): red Enter the second primary color (small letters): red You did not enter two primary colors NOTE: Both this program and the one from week 3 get identical output, but programs with small functions like this are easier to maintain and understandStep 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