Skip to content

ironhack-labs/mini-project-rock-paper-scissors

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 

Repository files navigation

logo_ironhack_blue 7

Mini Project | Rock-Paper-Scissors Game Development

Overview

In this activity, students will work in pairs to create a Rock-Paper-Scissors game using Python. This project will help them apply their programming skills while reinforcing concepts like functions, conditionals, and loops. Students will start by developing their game in a Jupyter Notebook, which allows for easy testing and iteration, and they will have the option to convert their notebook into a Python script later.

alt text

Context

This project is designed as a one-day exercise where each pair of students will conceptualize, develop, and test their Rock-Paper-Scissors game. The activity will be structured into several steps to guide students through the development process.

Activity Steps

Step 1: Project Setup

  • Choose Your Tools: Students will set up their development environment using Jupyter Notebooks.
  • Create a New Notebook: Name it rock_paper_scissors.ipynb.

Step 2: Define Game Rules

  • Outline the Game Logic: Discuss the rules of the game:
    • The player can choose Rock, Paper, or Scissors.
    • The computer randomly selects one of the three options.
    • Determine the winner based on the rules:
      • Rock crushes Scissors
      • Scissors cuts Paper
      • Paper covers Rock

Step 3: Implement the Game in Notebook

  • Coding the Game:
    1. Import Required Libraries: Use the random library to allow the computer to make random choices.
    2. Define Functions:
      • Create a function to get the player's choice.
      • Create a function to get the computer's choice.
      • Create a function to determine the winner based on player and computer choices.
    3. Game Loop: Implement a loop that allows players to play multiple rounds until they choose to quit.

Step 4: Testing and Debugging

  • Play & Test: Pairs should run their game in the notebook to ensure it works as expected. They should check for any bugs or logical errors and fix them.

Step 5: Optional Enhancements

  • Extra Features (Optional): Students are encouraged to add additional features such as:
    • Keeping score of wins, losses, and ties.
    • Adding a user interface using libraries like tkinter (for advanced students).

Step 6: Convert Notebook to Script (Optional)

  • After completing their game in Jupyter Notebook, pairs can convert their notebook into a Python script (rock_paper_scissors.py) if they choose. This step is optional and can serve as an additional learning experience on how to structure code for scripts.

Project Submission

  • Final Code Submission: Each pair will submit their completed Jupyter Notebook (rock_paper_scissors.ipynb) along with any additional features they implemented. If they converted their notebook to a script, they should include that file as well.
  • Documentation: Include comments in the code explaining key parts of the implementation and any challenges faced during development.
  • Submit the link to pull request in Student Portal.

Individual Reflections

  • After completing their projects, each student will share feedback in brief about 1-2 minutes each.
  • The reflection, you should try to address each of the below:
    • What they enjoyed most about working on the project.
    • Any challenges they encountered and how they overcame them.
    • Key programming concepts they learned through this exercise.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published