Names of two primary colors to mix

Assignment Help Basic Computer Science
Reference no: EM131682235

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.

Design a program that prompts the user to enter the names of two primary colors to mix. If the user enters anything other than "red," "blue," or "yellow," the program should display an error message. Otherwise, the program should display the name of the secondary color that results.

Note: Color names must be treated as string values: "red", "blue", "yellow"

Reference no: EM131682235

Questions Cloud

Describe the example of discrete random variables : Give an example of two discrete random variables X and Y on the same sample space such that X and Y have the same distribution, with support {1, 2,..., 10}.
How the given two items would change each year : The company could not predict with 100% accuracy how these two items would change each year, they just know that they were subject to change.
Number of batteries that were defective : Let X be the number of batteries that were defective P(X = 2)
Define examine the factors : Make sure to construct your paper as a persuasive essay where you critically examine the factors
Names of two primary colors to mix : Design a program that prompts the user to enter the names of two primary colors to mix. If the user enters anything other
Find an exact expression for the probability of a tie : Find an exact expression for the probability of a tie in the election (so the candidates end up with the same number of votes).
Explain why standards enable the policy by defining action : a) Explain why standards enable the policy by defining action. b) Provide an example to show the difference between password policy and password standard.
Research paper exploring the ministry of healths vision : Write a research paper exploring the Ministry of Health's vision and strategy to improve healthcare delivery for all citizens .
Briefly describe living conditions in developed countries : Briefly describe 3 living conditions in developed countries that have reached phase four, and contrast them with these same conditions

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Process of radioactivity for imaging

Nuclear medicine is a specialized branch of modern medicine that exploits the process of radioactivity for imaging, diagnosis, and treatment. Many imaging techniques inject small amounts of radioactive material into the body, which are then tracke..

  Calculate the value assigned to the perimeter variable

Your program should then display the value stored in perimeter. Be sure to declare all variables as integers at the beginning of the main() function.

  The federal reserve web site

In current business publications or on the Federal Reserve Web site (www.federalreserve.gov), find the press release from the most recent meeting of the FOMC. What is the targeted federal funds rate? How does the FOMC evaluate the balance of risks be..

  Watching movies on television

A study that looks at how children acquire new behaviors by watching movies on television would be an example of which of the following?

  Define functional requirements

BackgroundRefer to background information provided in Assessment 1 regarding the Commonwealth Government ‘My Health Record' project.Complete the Following.

  What are some of the key characteristics of an embedded os

What are some typical requirements or constraints on embedded systems?

  What would be the limitations of this approach

What is the danger of not having a strategic intent? In your answer, assume you are a hospital in a city with a population of 30,000 people, located about 50 miles away from a large city.

  Discuss your personal and professional future story

Create and present a 8- to 12-slide Microsoft PowerPoint presentation in class, in which you discuss your personal and professional future story.

  New access database and set up a table named sales rep

Create a new Access database and set up a table named Sales Rep. Be sure to create attributes, set a primary key, select data types, and add descriptions as necessary. Use the following information:

  Define a class to represent a node in a doubly linked chain

In a doubly linked chain, each node can point to the previous node as well as to the next node. Figure 4-9 shows a doubly linked chain and its head pointer. Define a class to represent a node in a doubly linked chain.

  Use the model to predict the enrollment in 2015

Education The numbers of students attending Wilder High School during various years are listed below

  Cost of communications services and components

We assume that EFG Corporation has two business offices. These offices are in the cities of Orlando and Miami. These cities are located 220 miles apart. We assume that there are 3 employees in Orlando and 6 employees in Miami. Further, we assume t..

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd