Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/qtle3/score_counter
This program lets you track the scores for a game between two players. You start by entering the players' names, and then the program keeps track of their scores as you play. The game goes on until one of the players wins by either getting at least 15 points with a 2-point lead or scoring 7 points while the other player has none.
https://github.com/qtle3/score_counter
basic-logic loops python user-input
Last synced: 12 days ago
JSON representation
This program lets you track the scores for a game between two players. You start by entering the players' names, and then the program keeps track of their scores as you play. The game goes on until one of the players wins by either getting at least 15 points with a 2-point lead or scoring 7 points while the other player has none.
- Host: GitHub
- URL: https://github.com/qtle3/score_counter
- Owner: qtle3
- Created: 2024-07-26T03:45:03.000Z (5 months ago)
- Default Branch: master
- Last Pushed: 2024-07-27T02:54:33.000Z (5 months ago)
- Last Synced: 2024-11-05T09:51:23.356Z (about 2 months ago)
- Topics: basic-logic, loops, python, user-input
- Language: Python
- Homepage:
- Size: 3.91 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Game Score Tracker
This program lets you track the scores for a game between two players. You start by entering the players' names, and then the program keeps track of their scores as you play. The game goes on until one of the players wins by either getting at least 15 points with a 2-point lead or scoring 7 points while the other player has none.
## Key Features
### Player Input
- The program prompts for the names of the two players.### Score Initialization
- Both players' scores start at zero.### Game Loop
The program enters a loop where it repeatedly:
- Displays the current score.
- Asks for the winner of the next point.
- Updates the score accordingly.### Winning Conditions
The game ends when one player:
- Reaches at least 15 points and is ahead by at least 2 points.
- Achieves a score of 7 while the other player has a score of 0.### Winner Announcement
- The program announces the winner once the game ends based on the scores.