Write a script le to play a simple number guessing

Write a script le to play a simple number guessing game as follows. The script should generate a random integer in the range 1, 2, 3, . . . , 14, 15. It should provide for the player to make repeated guesses of the number, and it should indicate if the player has won or give the player a hint after each wrong guess. The responses and hints are as follows:

■ “You won” and then stop the game.

■ “Very close” if the guess is within 1 of the correct number.

■ “Getting close” if the guess is within 2 or 3 of the correct number.

■ “Not close” if the guess is not within 3 of the correct number.

 

Leave a Comment

Your email address will not be published. Required fields are marked *

GradeEssays.com
We are GradeEssays.com, the best college essay writing service. We offer educational and research assistance to assist our customers in managing their academic work. At GradeEssays.com, we promise quality and 100% original essays written from scratch.
Contact Us

Enjoy 24/7 customer support for any queries or concerns you have.

Phone: +1 213 3772458

Email: support@gradeessays.com

© 2024 - GradeEssays.com. All rights reserved.

WE HAVE A GIFT FOR YOU!

15% OFF 🎁

Get 15% OFF on your order with us

Scroll to Top