logo Hurry, Grab up to 30% discount on the entire course
Order Now logo

Ask This Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed

expert
Abhishek MisraEconomics
(5/5)

660 Answers

Hire Me
expert
Bidit SadhukhanStatistics
(/5)

841 Answers

Hire Me
expert
Nalaka HapuarachchiStatistics
(/5)

593 Answers

Hire Me
expert
Kyle BaileyFinance
(4/5)

731 Answers

Hire Me
Python Programming

Create a function which will return a string with the color of the next M&M.   

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

General Instructions: Design a flowchart and Pseudo code for an application which will sort and count M&Ms according to the rules and logic below. • You are only allowed to use topics discussed in the book up to Chapter 6. You cannot use arrays! • The user must select three colors to count before the loop starts. You must prompt the user for each color. Assume the user will NOT enter the same color more than once. You do not have to write code to prevent this. • There are random number of M&Ms in the bin you are counting, between 1 and 200 M&Ms • You have to count all of the M&Ms in a single pass (loop). This means you can NOT go through the pile once, picking out a single color, then start over and count a different color.  

Defined Values: Use the following values for the possible M&M colors: • "Red" • "Green" • "Yellow" • "Brown" • "Blue" 

GetNextMM Function: Create a function which will return a string with the color of the next M&M.   

Process Steps: 1) Prompt the user for the name of the three colors they would like to count. 2) Count the number of each color of M&Ms using the method you decide works best. This will be some type of loop. When finished, you should have a count for each of the five colors, separately by color. 3) After all M&Ms are counted, print “Selected Colors: “and the names of the three selected colors and the M&M count for only the three colors. 4) Display “Colors Not Selected: “ and the count and color of M&Ms that were not one of the three selected colors.  

Example of Output: 
Selected Colors:  Red 15  Blue 25  Yellow 10 
Colors Not Selected:  Brown 17  Green 12   NOTE: Use Functions /Modules to reduce the amount and complexity of code. Deductions will be taken if you do not use 

Process Steps: 1) Prompt the user for the name of the three colors they would like to count. 2) Count the number of each color of M&Ms using the method you decide works best. This will be some type of loop. When finished, you should have a count for each of the five colors, separately by color. 3) After all M&Ms are counted, print “Selected Colors: “and the names of the three selected colors and the M&M count for only the three colors. 4) Display “Colors Not Selected: “ and the count and color of M&Ms that were not one of the three selected colors.  
 
Example of Output: 
Selected Colors:  Red 15  Blue 25  Yellow 10 
Colors Not Selected:  Brown 17  Green 12   NOTE: Use Functions /Modules to reduce the amount and complexity of code. Deductions will be taken if you do not use 

Related Questions

. The fundamental operations of create, read, update, and delete (CRUD) in either Python or Java

CS 340 Milestone One Guidelines and Rubric  Overview: For this assignment, you will implement the fundamental operations of create, read, update,

. Develop a program to emulate a purchase transaction at a retail store. This  program will have two classes, a LineItem class and a Transaction class

Retail Transaction Programming Project  Project Requirements:  Develop a program to emulate a purchase transaction at a retail store. This

. The following program contains five errors. Identify the errors and fix them

7COM1028   Secure Systems Programming   Referral Coursework: Secure

. Accepts the following from a user: Item Name Item Quantity Item Price Allows the user to create a file to store the sales receipt contents

Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip

. The final project will encompass developing a web service using a software stack and implementing an industry-standard interface. Regardless of whether you choose to pursue application development goals as a pure developer or as a software engineer

CS 340 Final Project Guidelines and Rubric  Overview The final project will encompass developing a web service using a software stack and impleme