Skip to content

Add a rock-paper-scissors CLI game #14

Description

@utk2103

Add a playable rock-paper-scissors game to scripts/.

Why

Covers the beginner core in ~40 lines: input(), random, while loop, dict lookup for the win table, and clean exit handling. Much friendlier than jumping straight to algorithms.

Suggested file

scripts/rock_paper_scissors.py

What it should do

  • Prompt for rock / paper / scissors (accept r/p/s too).
  • Computer picks with random.choice, print the round result.
  • Keep a running score; q quits and prints the final tally.

Acceptance criteria

  • Win logic is a dict or tuple table (beats = {"rock": "scissors", ...}), not a chain of if/elif.
  • Invalid input re-prompts instead of crashing.
  • Ctrl+C exits cleanly with the score, no traceback.
  • Standard library only.

Inspiration

Rock-Paper-Scissor from Awesome-Python-Scripts.

Good first issue — comment below to get assigned.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions