How to show the output and what prompts to display


Project Assignment: Random Number Guessing Game

Write a program that generates a random number in the range of 1 through 100, and asks the user to guess what the number is. When the number is generated by the computer, don't display the number to the user, but only display if the number generated is odd or even.
If the user's guess is higher than the random number, the program should display "Too high, try again." If the user's guess is lower than the random number, the program should display "Too low, try again." Keep asking the user till the correct number is guessed. If the user enters 0 for the guess, the game terminates.

When the user successfully guesses the number, the application should congratulate the user and then display how many tries it took the user to guess the number. Moreover, display all the odd or even numbers starting at 1, up to that number. (Display all odd numbers if the number itself was odd, or all even numbers if the number was even). For example, assume that 16 was the generated number. The final display should be:

You took x tries to guess the number.

16 is an even number.

All even numbers up to 16 are: 1, 2, 4, 6, 8, 10, 12, 14

To generate the random number, you need to import the random library (import random) and use the randint function ( random.randint(1, 100) )

Task

1) Make all the "best programming practice" decisions, e.g. how to show the output, what prompts to display, how to ask for input, etc.

2) You are the developer/engineer, it is YOUR decision ... YOUR job. If the program is not presented nicely, you will lose points.

3) First, all that is being asked should be done. Second, the displays should be intuitive, self-explanatory, and nicely put. Do NOT assume that the user knows ANYTHING.

4) Write the program such that any new person that sits in front of the terminal, can start playing with it (i.e., the commands, displays, etc. are adequate).

Format your assignment according to the following formatting requirements:

(1) The answer should be typed, double spaced, using Times New Roman font (size 12), with one-inch margins on all sides.

(2) The response also includes a cover page containing the title of the assignment, the student's name, the course title, and the date. The cover page is not included in the required page length.

(3) Also include a reference page. The Citations and references should follow APA format. The reference page is not included in the required page length.

Request for Solution File

Ask an Expert for Answer!!
Programming Languages: How to show the output and what prompts to display
Reference No:- TGS03078760

Expected delivery within 24 Hours