Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a guess game that asks the user to enter an integer number and displays three different hexadecimal numbers then asks the user to guess

Write a guess game that asks the user to enter an integer number and displays three different hexadecimal numbers then asks the user to guess which hexadecimal number matches their entered number. Your program should include the following: 1- Ask the user to enter a number between 10 and 50. 2- Find the equivalent Hexadecimal number to user entered number. 3- Generate randomly two more numbers one is smaller than the number entered by the user and one is bigger. These two numbers also are converted to Hexadecimal numbers. 4- Display the three hexadecimal numbers. 5- Prompt the user to guess the correct hexadecimal number. 6- Display a congrats message if the user guesses the answer and sorry message if they did not. 7- Prompt the user if they want to play another game. Notes: 1- It is possible the user to enter 10 or 50. In this case the program should generate the two random numbers either both above in case of 10 or both below in case of 50. 2- You should not display the answers in the same orders. Sample run Please enter number between 10 and 50: 2 Sorry, your entered number is out of the range. Please enter number between 10 and 50: 23 Which of the following hexadecimal numbers is equivalent to 23 a- 17 b- 1D c- F Enter your answer: b Sorry, this is not the correct answer. The correct answer is 17 Would you like to play again Y/y for yes and N/n for no? Y Please enter number between 10 and 50: 44 Which of the following hexadecimal numbers is equivalent to 44 a- 30 b- 12 c- 2C Enter your answer: d Try again, select a, b or c. Which of the following hexadecimal numbers is equivalent to 44 a- 30 b- 12 c- 2C Enter your answer: d Well done! The correct answer is 2C Would you like to play again Y/y for yes and N/n for no? n

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design And Relational Theory Normal Forms And All That Jazz

Authors: Chris Date

1st Edition

1449328016, 978-1449328016

More Books

Students also viewed these Databases questions

Question

=+ What are the information and consultation requirements?

Answered: 1 week ago

Question

What is focal length? Explain with a diagram and give an example.

Answered: 1 week ago

Question

What is physics and how does it apply in daily life?

Answered: 1 week ago

Question

How do Dimensional Database Models differ from Relational Models?

Answered: 1 week ago

Question

What type of processing do Relational Databases support?

Answered: 1 week ago

Question

Describe several aggregation operators.

Answered: 1 week ago