Write a sub procedure that plays a simple number guessing

Assignment Help Computer Engineering
Reference no: EM132216451

Question :

1. Write a sub procedure that plays a simple number guessing game in five rounds of play. Your program chooses the number to be guessed by selecting an integer at random in the range [1-100]. Your sub procedure must organize the output as a table with the round number, value of each guess, and the status of each guess as "Too High", "Too Low", or "Correct!" You must also meet the following requirements:

a. The sub procedure should be named number Guess.

b. You must use a single input box to request each guess of the player. In the input box, you must display the prompt "I have a number between 1 and 100 -- can you guess my number? The input box must also inform the player of the round number and the number of guesses remaining in the game.

c. Your program must verify the guess input by the player to ensure it can represent an integer number in the correct range (1 - 100). If the player does not enter a valid guess, the input box must continue to request an integer in the range using a message box until the player provides valid data. This same functionality must be provided if the player presses the "OK" button on the input box without providing an input or if the player presses the "Cancel" button on the input box.

d. The color of each cell for the guess in the table (after the first) should be changed to red to indicate the player is getting "warmer", blue to indicate the player is getting "colder", or green to indicate a correct guess. This functionality must be implemented with the use of the of f set property and selection statements.

e. A message box should alert the player of a game over and reveal the answer if no correct guess is made in five rounds or if a correct guess is made. Also, the game should not continue if a correct guess is made.

Assign the sub procedure Number Guess to a rectangular shape button. The caption of the rectangular shape button should Egad "Guess the Number?"

2. Write a sub procedure named Reset, Game that will clear the output table. Assign the sub procedure Reset .Game to a rectangular shape button. The caption of the rectangular shape button should read " Read".

Reference no: EM132216451

Questions Cloud

What demographics can you learn about potential buyers : Visit the U.S. Census website. What information can you find that will help you to estimate the size of the market for your marketing plan topic?
Write ten sql select statements to query the student : Show the number of students whose zip is 07070. List all students (display student_id, first name, last name, and employer) who live in Columbus, OH.
Examine the pricing approach for the dental clinic : A dentist in Cali, Colombia, has decided to target adult orthodontia patients in the Southeastern United States. He offers the Invisalign braces.
Write a program that compares the values of y1 and y2 : For the following T(n) find values of n0 and c such that cn3 is larger than T(n) for all n larger than n0. T(n) = n3 - 5n2 + 20n - 10
Write a sub procedure that plays a simple number guessing : Write a sub procedure that plays a simple number guessing game in five rounds of play.
Does diversity affect ethical decisions : Include how these issues relate to each other. For instance: how do gender differences affect communication? How does technology affect communication.
What interesting trends are you aware of : Have a heading for each section and bold. List the opportunities first (bullets or numbers) and then explain. List the most significant threat and then explain.
Explain the process of discovering evidence which can inform : Explain the theoretical perspective from which you understand and apply knowledge as it relates to your own social work practice.
What are the key methods of identity development : As technology improves and changes, what are some things that individuals and organizations do to impact change and development in the digital age?

Reviews

Write a Review

Computer Engineering Questions & Answers

  Write a procedure that performs simple encryption

Write a procedure that performs simple encryption by rotating each plaintect byte a varying number of positions in different directions.

  What is the best way to connect the workstations

What is the best way to connect the workstations to the mainframe computer? Explain your reasoning and all the possible solutions you considered.

  Library management system

Prepare a module which can exhibit the Library Management System

  Explain an appropriate hardening technique

Please select an appropriate hardening technique to meet the requirements of the security policy statement. Provide rationale for each selection.

  Express limitations and current research trends in the area

Autonomous (intelligent) software agents are used in Artificial Intelligence to solve an increasing number of complex problems. explain their main applicability as well as their advantages, limitations and current research trends in the area.

  Write a program that asks the user to enter a month

Write a program that asks the user to enter a month (1 for January, 2 for February, and so on) and then prints the number of days in the month.

  Describe the relative level of control of the project

Assume you are hired to manage a VERY large IT project such as the initial creation of Amazon.com. Write a paper describing the project and then provide.

  Identify the key building blocks of an it audit

Identify the key building blocks and the critical requirements of an IT audit. Explain the importance of using standards in IT compliance auditing.

  Write a program to add and multiply mod n

Write a C++ computer program to add and multiply mod n, for any n given as input.

  1 your senior manager catches up with you after your

1 your senior manager catches up with you after your project status meeting to tell you that your project has been

  Develop a release plan through the use of graphical tools

Develop a release plan through the use of graphical tools in Microsoft Word or Visio, or an open source alternative such as Dia. Note: The graphically depicted.

  Show that set cover can be polynomial-time reduced

Show that Set Cover can be polynomial-time reduced to CNF-SAT (CNF-SAT is essentially 3SAT without the restriction of having at most 3 literals per clause).

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