Using C++
COLOR MIXER- The color red, yellow, and blue are primary colors because they cannot be made by mixing other colors. When you mix 2 primary colors you get the following:
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.
Write a program to ask the user for 2 primary colors (an error if they are not primary). Then display the secondary color you get by mixing them.
Code :
#include<iostream>
using namespace std;
int main(){
string priclr[3]={"red","yellow","blue"};
string x,y;
cout<<"Enter the first primary color : ";
cin>>x;
cout<<"\nEnter the second primary color :
";
cin>>y;
cout<<"======================================================";
if((priclr[0]==x and priclr[1]==y)||(priclr[0]==y and
priclr[1]==x)){
cout<<"\nSecondary color is :
Orange";
}
else if((priclr[0]==x and priclr[2]==y)||(priclr[0]==y
and priclr[2]==x)){
cout<<"\nSecondary color is :
Purple";
}
else if((priclr[2]==x and priclr[1]==y)||(priclr[2]==y
and priclr[1]==x)){
cout<<"\nSecondary color is :
Green";
}
else{
cout<<"\nNot a primary
color";
}
return 0;
}
Screenshot of the code :

Using C++ COLOR MIXER- The color red, yellow, and blue are primary colors because they cannot...
Python problem: 1. 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 here: 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. Create a text file with the names of two colors in it. Write a program...
Directions: Complete all the three programming assignments below. Please be sure to follow the programming rubric provided. Turn in three separate “.py" files. Be sure to run your programs before submission. Color Mixer The colors red, blue, and yellow are called primary colors, because they cannot be made by mixing other colors. When you mix two primary colors, you get a secondary color, as shown here: • When you mix red and blue, you get purple. • When you mix...
yellow red green orange purple blue Select the color of the solution using the indicator thymol blue. When you first add indicator to your Na2CO3 solution, the color is blue When you reached the first equivalence point when moles of acid equals moles of base, the color is orange x. When you weren't paying attention and added too much HCl, the color is purple lx. When you really weren't paying attention and reached the second equivalence point, which is NOT...
Using yellow, cyan, and magenta as primary colors, express green, red, and blue in the vector form.
250 Experiments 2. A solution causes a yellow color with thymol blue, an orange color with methyl orange, a color with methyl red, and a yellow color with bromthymol blue. The pH must le between and The estimated pH is_ b. A solution causes a yellow color with thymol blue, yellow colors with both methylona and methyl red, and a green color with bromthymol blue. The pH must lie between and The estimated pH is
Write an interactive C++ program that asks a user to input the color code of a resistor and determines its value and tolerance Tell the user how to input the color rings “Instructions” Tell the user to input the colors one after the other After the program receives the information it will display the resistance and tolerance Output an error message if the user enters an invalid color code (no garbage values should be displayed), and ask for another input...
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...
You are required to design a colour mixer. It is allowed to use a maximum of only two colours at a time from the available three that are Yellow, Red and Green. The combination of the colours and their results are shown in the diagram below, and only Orange and Green colour outcomes are acceptable. Blue Red Yelow Purple Green Orange A. Prepare the truth table for this scenario B. Deduce the canonical sum of products that give you the...
Which of the following visible colors of light has the highest frequency? blue orange O red yellow green
Plain M&M’s candies come in six colors: yellow, red, orange, brown, blue, and green. The makers of M&M’s say that 20% of the produced candies are yellow, 20% are red, 20% are orange, 15% are brown, 15% are blue, and the rest of the produced candies are green. Given what you know about probability and probability models, which one of the following statements is correct? A More than 10% of the produced candies must be green. B If we randomly...