Question: 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

python Problem #1 Problem #5 Revisit the MixColors s Take your answer

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 understand

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!