Question

The Color Mixer The colors red, blue, and yellow are known as the primary colors because...

The Color Mixer

The colors red, blue, and yellow are known as the primary colors because they cannot be made by mixing other colors. When you mix two primary colors, you get a secondary color, as shown down below. Once you have complete that task, use a repetition structure down below.
When you mix red and blue, you get purple.
When you mix red and yellow, you get orange.
When you mix blue and yellow, you get green.

Using While Loop to execute the program until some condition is met (like having the user input a 'Y' if they want to do another or a 'N' if they want to stop).

Using For Loop to execute the program a specific number of times.

Using Do Loop to execute the program once, then check to see if it should be run again.

(Please answer this question in the flowgorithm/flow chart or Gaddis Pseudo Code (not in JAVA or PYTHON)

Homework Answers

Answer #1

Here is the required program code in Flowgorithm. Save this code as a file with .fprg extension and open in Flowgorithm (if the image provided is not clear). Let me know if you have any doubts or if you need anything to change. If you are satisfied with the solution, please rate the answer. If not, PLEASE let me know before you rate, I’ll help you fix whatever issues. Thanks

CODE

<?xml version="1.0"?>

<flowgorithm fileversion="2.11">

    <attributes>

        <attribute name="name" value=""/>

        <attribute name="authors" value=""/>

        <attribute name="about" value=""/>

        <attribute name="saved" value="2020-07-17 08:52:21 AM"/>

        <attribute name="created" value="RW5pZ21hO1RJVEFOSVVNOzIwMjAtMDctMTc7MDg6NDA6MDYgQU07MjQ3OA=="/>

        <attribute name="edited" value="RW5pZ21hO1RJVEFOSVVNOzIwMjAtMDctMTc7MDg6NTI6MjEgQU07MTsyNTg2"/>

    </attributes>

    <function name="Main" type="None" variable="">

        <parameters/>

        <body>

            <comment text="declaring variables needed"/>

            <declare name="color1, color2, result, choice" type="String" array="False" size=""/>

            <comment text="looping"/>

            <do expression="choice==&quot;Y&quot; || choice==&quot;y&quot;">

                <comment text="asking and reading two colors"/>

                <output expression="&quot;Enter primary color 1:&quot;" newline="True"/>

                <input variable="color1"/>

                <output expression="&quot;Enter primary color 2:&quot;" newline="True"/>

                <input variable="color2"/>

                <comment text="checking if colors are red and blue"/>

                <if expression="(color1==&quot;red&quot; &amp;&amp; color2==&quot;blue&quot;) || (color1==&quot;blue&quot; &amp;&amp; color2==&quot;red&quot;)">

                    <then>

                        <comment text="red+blue is purple"/>

                        <assign variable="result" expression="&quot;purple&quot;"/>

                    </then>

                    <else>

                        <comment text="otherwise checking if colors are red and yellow"/>

                        <if expression="(color1==&quot;red&quot; &amp;&amp; color2==&quot;yellow&quot;) || (color1==&quot;yellow&quot; &amp;&amp; color2==&quot;red&quot;)">

                            <then>

                                <comment text="red+yellow is orange"/>

                                <assign variable="result" expression="&quot;orange&quot;"/>

                            </then>

                            <else>

                                <comment text="otherwise checking if colors are blue and yellow"/>

                                <if expression="(color1==&quot;yellow&quot; &amp;&amp; color2==&quot;blue&quot;) || (color1==&quot;blue&quot; &amp;&amp; color2==&quot;yellow&quot;)">

                                    <then>

                                        <comment text="yellow+blue is green"/>

                                        <assign variable="result" expression="&quot;green&quot;"/>

                                    </then>

                                    <else>

                                        <comment text="any other input is invalid"/>

                                        <assign variable="result" expression="&quot;invalid input&quot;"/>

                                    </else>

                                </if>

                            </else>

                        </if>

                    </else>

                </if>

                <comment text="displaying the result"/>

                <output expression="result" newline="True"/>

                <comment text="asking and reading choice to continue or not"/>

                <output expression="&quot;Do you want to try again? Y/N&quot;" newline="True"/>

                <input variable="choice"/>

            </do>

            <comment text="finishes when user enter anything other than Y or y"/>

        </body>

    </function>

</flowgorithm>

CODE SCREENSHOT

OUTPUT SCREENSHOT

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
You have been given the following lists of Color and their specific codes: Colors = ['Red','Blue','Green','Black','Yellow',‘Orange’,‘Purple’,‘Nocolor’]...
You have been given the following lists of Color and their specific codes: Colors = ['Red','Blue','Green','Black','Yellow',‘Orange’,‘Purple’,‘Nocolor’] Codes = [97,17,19,128,66,111,231,00] 1. Using codeDict, find the score for 'Nocolor'. 2. Add a code of 333 for 'Nocolor'. 3. Create a sorted list of all the codes in codeDict. 4. Update the name for 'Nocolor' to be ‘white’ 5. White was not a part of original colors list so, just Delete it and its code from codeDict. USE PYTHON CONSOLE AND SUBMIT THE...
Milk Chocolate M&M’s come in 6 colors; blue, orange, green, yellow, red, and brown. Choose the...
Milk Chocolate M&M’s come in 6 colors; blue, orange, green, yellow, red, and brown. Choose the color of M&M’s you will be working with for this project Color: GREEN Using the collected data below from a single fun-sized bag, provide the frequency and proportion of M&M’s in your color of choice. Red Orange Yellow Green Blue Brown 2 1 2 3 5 1 Number of M&M's in your color: Total number of M&M's: Proportion of M&M's in your color: Construct...
M&Ms are multicolored candies in a bag with six colors: Brown, Blue, Red, Yellow, Green and...
M&Ms are multicolored candies in a bag with six colors: Brown, Blue, Red, Yellow, Green and Orange. Mars now claims that all six colors are equally likely. In an attempt to reject the claim, an 8-oz bag of M&Ms was purchased and the colors counted. The results of the count are below. Does this sample contradict Mars’ claim when α = 0.10? Brown Blue Red Yellow Green Orange 37 41 32 25 36 39 If the claim is true what...
Plain M&M's come in 6 different colors (Blue, Orange, Green, Yellow, Red, Brown) and are produced...
Plain M&M's come in 6 different colors (Blue, Orange, Green, Yellow, Red, Brown) and are produced at two different plants. M&M's that come from a plant in Tennessee are supposed to have the following distribution of colors: 20.7% Blue; 20.5% Orange; 19.8% Green; 13.5% Yellow; 13.1% Red and 12.4% Brown. Quality control at the plant is concerned the machine is not working correctly and that it is producing a different distribution of colors. They take a random sample of 940...
A particular brand of sour candy comes in packages with seven (7) colors (red, orange, yellow,...
A particular brand of sour candy comes in packages with seven (7) colors (red, orange, yellow, green, blue, purple, and white). The manufacturer claims the seven colors are equally represented in each bag. In a goodness of fit experiment to test their claim, Professor Oehrlein's students collected many, many bags of the candy and counted the frequency of each color of candy. Each of the thirty (30) students collected five (5) bags of twenty-one (21) candies. What is the expected...
Milk Chocolate M&M’s come in 6 colors; blue, orange, green, yellow, red, and brown. The color...
Milk Chocolate M&M’s come in 6 colors; blue, orange, green, yellow, red, and brown. The color is red and the number of candies is 25/200 total M&Ms 1. Choose your favorite color of M&M’s you will be working with for this project. State the color and give the counts below. Color of choice: Number of M&M's in your color: Total number of M&M's: Proportion of M&M's in your color: 2. Construct a 95% confidence interval for the proportion of M&M’s...
Skittles Brand candies come in red, orange, yellow, green, and purple (violet). It is well known...
Skittles Brand candies come in red, orange, yellow, green, and purple (violet). It is well known that M&M Brand candies are not represented with equal frequency. However, do the colors of Skittles candies occur with equal frequency? 1. Decide on a color to test, and get yourself a bag of (classic) Skittles. (Counting for Red Skittles) 2. Write the appropriate null and alternative hypotheses using proportions, to determine if the proportion of each color is the same in a bag...
M&M chocolates come in six different colors: red, orange, yellow, green, blue and brown. A market...
M&M chocolates come in six different colors: red, orange, yellow, green, blue and brown. A market researcher believes that the six color proportions are not evenly distributed for the population of all M&Ms produced. To test this theory, he first selects his significance level to be 10% and then sets up the following goodness of fit test null hypothesis: H0: All 6 M&M color proportions are equal to 1/6 Suppose that the six colors are evenly distributed for the population...
A coworker claims that Skittles candy contains equal quantities of each color (purple, green, orange, yellow,...
A coworker claims that Skittles candy contains equal quantities of each color (purple, green, orange, yellow, and red). In other words, 1/5 of all Skittles are purple, 1/5 of all Skittles are green, etc. You, an avid consumer of Skittles, disagree with her claim. Test your coworker's claim at the α=0.10 level of significance, using the data shown below from a random sample of 200 Skittles. Which would be correct hypotheses for this test? H0:p1=p2 ; H1:p1≠p2 H0: Red Skittles...
In a sock drawer, you have a pair of blue socks, red socks, yellow socks, orange...
In a sock drawer, you have a pair of blue socks, red socks, yellow socks, orange socks, purple socks and green socks. You randomly pull out a sock one at a time until you select a pair of matching socks. Let pr be the probability that you get your first matching pair on the r’th sock pulled from the drawer. Find pr for r = 2, 3, . . ..
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT