This is a beginner-friendly Python project: a simple Rock, Paper, Scissors game. It’s designed to reinforce foundational Python programming concepts such as loops, conditionals, input handling, and random number generation.
- Allows users to:
- Play Rock, Paper, Scissors against the computer.
- Quit the game at any time by typing
quit
. - Get immediate feedback on game outcomes (win, lose, tie).
- Includes input validation to handle invalid entries.
- Demonstrates key Python concepts:
- Loops: Use of
while
to enable continuous gameplay. - Random module: Randomly selecting the computer's choice.
- Conditional statements: Determining game logic and outcomes.
- Input handling: Capturing and processing user input.
- String manipulation: Normalizing input to make it case-insensitive.
- Loops: Use of
- Deepened understanding of Python fundamentals, including:
- How to use the
random
module to generate random choices. - Leveraging
if-elif-else
statements for logic flow. - Implementing user input validation with the
in
operator. - Using loops to build interactive applications.
- Dynamic string formatting with f-strings for better user feedback.
- How to use the
Choose - Rock, Paper, or Scissors: rock
Computer chose: scissors
You win!
Choose - Rock, Paper, or Scissors: paper
Computer chose: rock
You win!
Choose - Rock, Paper, or Scissors: quit
- Ensure you have Python 3.9+ installed on your system. You can download it from python.org.
- Save the
python_101_project.py
file on your computer. - Open a terminal or command prompt.
- Navigate to the directory where the file is saved.
- Run the program using the command:
python python_101_project.py
This project was based on the instructions from the Python section of the Ultimate 2024 Fullstack Web Development Bootcamp on Udemy. Special thanks to the instructor Kalob Taulien for his guidance.