I have to create a program and I need help this is the program:Create a two-player game that involves guessing a number between 1 and 100. The program will generate numbers using the randint function from the random module. Version 1.0 Write pseudocode for the following. Have your pseudocode approved before programming. 1. Each player must take a guess at what the secret number is. 2. The player closest to the value wins a point and the secret value is revealed. Version 2.0 Only when the above functionality is completed add the following features. 1. Play continues until 4 rounds are reached. 2. At the end of a match (x rounds) the winner is declared. 3. Each player takes turns guessing first. (Why is this more fair?) 4. Entering 'q' at any point quits the game. Version 3.0 Only when the above functionality is completed add the following features. 1. Users choose the number of rounds to play when the game starts. 2. Entering 'q' during game-play returns the players to a main menu where they can choose to play a new match. 3. Player 1 and player 2 may choose names for themselves. Polishing your work 1. Identifiers (variable names, function names, module names etc.) should be descriptive. 2. Comments should be clear but not longer than necessary. 3. Use functions to make source code more readable.
Aucun commentaire:
Enregistrer un commentaire