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
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...
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...
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...
Suppose that you are a pottery artist and want to create a special color to paint...
Suppose that you are a pottery artist and want to create a special color to paint your work of art. Using the primary colors of red, green, and blue (or RGB), combine the three primary colors to create new color schemes for painting your artwork. Describe how you would mix your color mathematically. What subspace would you operate in? List your base vectors and describe them. If you want to vary the intensity of certain colors, how would you do...
Are candy color pieces uniformly distributed? In a 2 ounce bag of Skittles, there are green,...
Are candy color pieces uniformly distributed? In a 2 ounce bag of Skittles, there are green, red, yellow, orange and purple pieces. Ideally, each bag should have the same amount of pieces for each color (so colors/categories are equally likely.) PROJECT: Pick (or Google a picture of) a bag of candy (Skittles, M&Ms or Mike & Ikes, etc) that fulfills the requirements listed below and perform a goodness of fit test for uniform distribution (use a 0.05 significance level.) Requirements...
Are candy color pieces uniformly distributed? In a 2 ounce bag of Skittles, there are green,...
Are candy color pieces uniformly distributed? In a 2 ounce bag of Skittles, there are green, red, yellow, orange and purple pieces. Ideally, each bag should have the same amount of pieces for each color (so colors/categories are equally likely.) PROJECT: Pick (or Google a picture of) a bag of candy (Skittles, M&Ms or Mike & Ikes, etc) that fulfills the requirements listed below and perform a goodness of fit test for uniform distribution (use a 0.05 significance level.) Requirements...
Suppose the makers of M&M candies give the following average percentages for the mix of colors...
Suppose the makers of M&M candies give the following average percentages for the mix of colors in their bags of plain chocolate M&M's. Stated Distribution of Colors Brown Yellow Red Orange Green Blue    Percent      30%   20%   20%   10%   10%   10%    Now, you randomly select 200 M&M's and get the counts given in the table below. You expected about 20 blues but only got 8. You suspect that the maker's claim is not true. Observed Counts by Color...
M&M's Color Distribution: Suppose the makers of M&M candies give the following average percentages for the...
M&M's Color Distribution: Suppose the makers of M&M candies give the following average percentages for the mix of colors in their bags of plain chocolate M&M's. Stated Distribution of Colors Brown Yellow Red Orange Green Blue Percent   30%   20%   20%   10%   10%   10% Now, you randomly select 200 M&M's and get the counts given in the table below. You expected about 20 blues but only got 9. You suspect that the maker's claim is not true. Observed Counts by Color...
M&M's Color Distribution: Suppose the makers of M&M candies give the following average percentages for the...
M&M's Color Distribution: Suppose the makers of M&M candies give the following average percentages for the mix of colors in their bags of plain chocolate M&M's. Stated Distribution of Colors Brown Yellow Red Orange Green Blue Percent   30%   20%   20%   10%   10%   10% Now, you randomly select 200 M&M's and get the counts given in the table below. You expected about 20 blues but only got 9. You suspect that the maker's claim is not true. Observed Counts by Color...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT