Skip to content

dillguill/rock-paper-scissors

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Python Rock, Paper, Scissors Game

Overview

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.

Features

  • 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.

What I Learned

  • 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.

Example Gameplay

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

How to Run

  1. Ensure you have Python 3.9+ installed on your system. You can download it from python.org.
  2. Save the python_101_project.py file on your computer.
  3. Open a terminal or command prompt.
  4. Navigate to the directory where the file is saved.
  5. Run the program using the command:
    python python_101_project.py

Credits

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.

About

Python Rock, Paper, Scissors Game

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages