CSCI 1103 Columbus State College Hi & Low Guessing Game Python Lab 7 Assignment: Lab Exercise 7 Python: Hi/Low Guessing Game Python Assignment The objec

CSCI 1103 Columbus State College Hi & Low Guessing Game Python Lab 7 Assignment: Lab Exercise 7

Python: Hi/Low Guessing Game

Don't use plagiarized sources. Get Your Custom Essay on
CSCI 1103 Columbus State College Hi & Low Guessing Game Python Lab 7 Assignment: Lab Exercise 7 Python: Hi/Low Guessing Game Python Assignment The objec
For $10/Page 0nly
Order Essay

Python Assignment

The objectives of this lab assignment are as follows:

Declare variables
Use comments
Receive input from the user
Output data to the console
Apply conditional logic
Convert string value to int
Use the Random library
Use while loops
Assignment User Story

As a user I want an application that will allow a user to play the hi/low guessing game where the computer picks a number from 1 to a maximum inputted value and your task as a user to guess the number the computer generates.

Assignment Requirements

In this application you will first randomly generate a number unknown to the user, and the user will guess what that number is and will continue to guess until their guess matches the randomly generated number.

This assignment combines operations of prompting and receiving input from the user with conditional logic to perform a specific function based on those inputs. This assignment outputs information back to the user, and finally, loops through these operations until the user ends the application.

Program flow
You must receive the maximum number that the application will use in choosing its random number. Your application will then generate a random number from 1 to the maximum value the user keyed in (inclusive of that value).
The remaining sequence will be contained within a loop where the user will be asked to guess the randomly generated number. If what the user enters is a match, then the user will be congratulated on guessing the correct number. Otherwise, the user will be informed whether their guess is higher or lower than the actual value.
Once the user guesses the randomly generated value they will be asked if they wish to play another game. If they answer in the affirmative the game will begin anew, otherwise the application will end.

This application contains two loops: one within the other—an inner loop and an outer loop. The outer loop control’s subsequent game play in that the user is prompted if they wish to play the game again. The inner loop causes the user to be prompted to guess the randomly generated number. The inner loop continues until the user’s guess matches the computers number. The outer loop continues until the user no longer wishes to play the game.

Important:

When complete, your output should appear as pictured below:

Notice that if users affirm they wish to play again, the game starts over from the beginning:

Technical/Grading Requirements

You must ensure that the application you submit meets all the technical/grading requirements. Your grade will be based on how well your application follows these requirements:

The name of your application will be HiLoGame.py
You must have a set of comments at the top of the program that identifies the programmer, date, and name of the program file. Furthermore, you must provide a description of what this program is and what it does. Each of these comments must be on individual lines.
Your program must contain two loops: an outer and an inner. Hence, you will be working with the concept of “nested” loops. The outer loop controls the next game play, while the inner loop controls the current game play.
You must randomly generate a number from 1 to the maximum value the user enters at the start of the game.
Optional

Can you validate that numeric entries made by the user are indeed numeric? This is to say that the program should not end with an exception error due to the user inputting invalid data. Hint: this is accomplished through use of while loops that continue to prompt the user until their entry is valid.

This is optional for this assignment but will be a requirement of your next application. As such, this would be a great opportunity to begin exploring this concept.

In the screen capture below, you can see that I have protected the application against invalid numeric entry:

Calculator

Calculate the price of your paper

Total price:$26

Need a better grade?
We've got you covered.

Order your paper