Write a number guessing game program

Assignment Help Programming Languages
Reference no: EM13907368

1. Ask the user for a color
2. If the user types your favorite color (if you don't have one, pick blue), output That is my favorite color to the console Otherwise, output What color is that again?

Create a flowchart and do the following
1. Ask the user for how many cats they own (use the variable cats)
2. Assign cats into the variable animals
3. Ask the user for how many dogs they own (use the variable dogs)
4. Increment animals by the value of the variable dogs
5. Output the value of animals, which should now be the total number of cats and dogs

Instructions

Create a flowchart and do the following
1. Assign 15 into the variable count
2. Increment count by 7
3. Output the value of count to the Master Console

Create a flowchart and do the following
1. Add a loop symbol
2. Initialize the loop control variable count with the value of 0 (before the loop)
3. Use count = 5 as the loop Boolean expression
4. Inside the loop do the following in order

1. output the string hey
2. increment count by 1

Create a flowchart and do the following
1. Add a loop symbol
2. Initialize the loop control variable num with the value of 0
3. Inside the loop ask the user for a number. if the number is equal to 5 exit the loop.
4. When the loop exits, output the message Finished!

Part I

Write a number guessing game program. The program will first generate a random number from 1 to 100. Then, the user guesses a number and the game will report whether the guess is too low or too high. if the guess is correct the game will report that the user won.

To generate a random integer from 1 to n, use floor ( (random * n) + 1)

For example, to generate a random number from 1 to 6, use the following code: floor ( (random 6) + 1)

Part II

Add a variable for the number of tries, and when the user wins report how many tries it took them.

Instructions

Jse a loop to Ask the user for 5 test scores (1 to 100) and store them in an array then, output the numbers backwards

Extra Credit

Find the lowest, highest & average test score (using a loop)

Reference no: EM13907368

Questions Cloud

Program that declares three variables minnum : Write a C++ program that declares three variables minNum, midNum and maxNum to receive three integers read from the keyboard.
Where security is an it concern. : Take a few minutes to consider all areas where security is an IT concern. Select one you think is the most important and explain why you consider it important. As we go through the course,  visit this topic again and see if you agree with your first ..
Requires an initial cash outlay : AXY requires an initial cash outlay of $675,000 for equipment. You expect to spend an additional $45,000 in the first year to cover costs as the project will produce negligible cash inflows for that year. During years 2 through 6, you expect to recei..
What would the risk-free rate have to be for the two stocks : Stock Y has a beta of 1.3 and an expected return of 13 percent. Stock Z has a beta of 0.75 and an expected return of 10.5 percent. What would the risk-free rate have to be for the two stocks to be correctly priced relative to each other?
Write a number guessing game program : Write a number guessing game program. The program will first generate a random number from 1 to 100. Then, the user guesses a number and the game will report whether the guess is too low or too high.
Considering an annuity which costs : You are considering an annuity which costs $54200 today. The annuity pays $5800 a year. The rate of return is 6 percent. What is the length of the annuity time period?
Exist at the start of the next decade : Which jobs that exist today likely will not exist at the start of the next decade? Based on your best guess on how technology will develop, can you think of jobs and skill sets that will likely emerge as critical five and 10 years from now?
Who are the stakeholders in this situation : However, if you disclose news of the dump problem now, the offering will likely be jeopardized. But the prospect of holding a news conference and explaining your role in keeping the dump a secret keeps you up at night - Who are the stakeholders in..
Treausy rate-what is this stocks required rate of return : The ten year US Treausy rate is currently 3.37%, the long term expected market rate is 11.5%, and a stock's beta is 1.47. Using CAPM, what is this stocks required rate of return

Reviews

Write a Review

Programming Languages Questions & Answers

  Write a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

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