logo Hurry, Grab up to 30% discount on the entire course
Order Now logo

Ask This Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed

expert
Zaiden GarzaResume writing
(5/5)

611 Answers

Hire Me
expert
Pankaj KukrejaSociology
(5/5)

995 Answers

Hire Me
expert
Fatima SekhFinance
(5/5)

811 Answers

Hire Me
expert
Catherine Chanwai EarleLaw
(5/5)

598 Answers

Hire Me
Others
(5/5)

this assignment, you will need to write a program that will allow the user to play a game

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

Problem Description:

In this assignment, you will need to write a program that will allow the user to play a game. The program will start with showing the user a list of two games (‘Guess the Number’ and ‘Math Challenge’) and ask the user which one she/he wants to play. However, to keep the assignment manageable, you are being asked to implement only the first of these two games. If the user selects the second game, a ‘technical error’ message is shown, and the list of games is again shown to select an option from.

If the user selects the first game, “Guess the Number”, the program will randomly generate a number between 10 and 30 (inclusive) and allow the user at most 10 (ten) chances to guess it. If the user can correctly guess the number within 10 chances, she/he is awarded one point, otherwise zero point is awarded. After a round is over, the user is asked if she/he wants to play a game again or not. If the user enters a ‘Y’, she/he is again shown the list of games to choose from. If the user anything else, she/he is shown the total number of points obtained in this session of play (each round contributes at most one point) and the program exits.

Implementation:

You need to implement the program using 5 (five) functions:

(i) get_validated_input

(ii) get_game_choice

(iii) play_math_challenge_game

(iv) play_guess_the_number_game

(v) main

Each of these functions is dedicated to performing a single task. (i) gets a number from the user within a specified range, (ii) gets a number from the user indicating which game she/he wants to play, (iii) shows a message that this game is not currently playable, (iv) implements the game ‘Guess the Number’, and (v) is the function that drives the program by presenting the user game options, collecting the option and calling the appropriate game function, asking the choice to continue playing, showing the total points at the end, bidding goodbye, etc.

(5/5)
Attachments:

Related Questions

. The fundamental operations of create, read, update, and delete (CRUD) in either Python or Java

CS 340 Milestone One Guidelines and Rubric  Overview: For this assignment, you will implement the fundamental operations of create, read, update,

. Develop a program to emulate a purchase transaction at a retail store. This  program will have two classes, a LineItem class and a Transaction class

Retail Transaction Programming Project  Project Requirements:  Develop a program to emulate a purchase transaction at a retail store. This

. The following program contains five errors. Identify the errors and fix them

7COM1028   Secure Systems Programming   Referral Coursework: Secure

. Accepts the following from a user: Item Name Item Quantity Item Price Allows the user to create a file to store the sales receipt contents

Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip

. The final project will encompass developing a web service using a software stack and implementing an industry-standard interface. Regardless of whether you choose to pursue application development goals as a pure developer or as a software engineer

CS 340 Final Project Guidelines and Rubric  Overview The final project will encompass developing a web service using a software stack and impleme