Skip to content

Commit 69ad103

Browse files
author
Kudzayi
committed
Updated workshop content
1 parent 5d8be79 commit 69ad103

21 files changed

+196
-190
lines changed

README.md

+125-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,129 @@
1-
# Getting Started
2-
To get started, simply follow the instructions outlined in the instructions.md file for installing Python corresponding to your operating system.
1+
# Introduction to Python Workshop
32

4-
# Code Editor Instructions
5-
After you have downloaded Python, refer to the code-editor-instructions.md file and follow the instructions to download a code editor.
3+
Welcome to the Introduction to Python Workshop! This workshop is designed for beginners to learn the basics of Python programming through interactive sessions and hands-on coding exercises. By the end of the workshop, participants will have built a functional Rock-Paper-Scissors game.
64

5+
## Table of Contents
76

7+
- [Introduction](#introduction)
8+
- [How to Install](#how-to-install)
9+
- [Downloading Python](#downloading-python)
10+
- [Downloading a Code Editor](#downloading-a-code-editor)
11+
- [Workshop Overview](#workshop-overview)
12+
- [Workshop Goals](#workshop-goals)
13+
- [Schedule](#schedule)
14+
- [Requirements](#requirements)
15+
- [Workshop Content](#workshop-content)
16+
- [How Python Works](#how-python-works)
17+
- [Data Types](#data-types)
18+
- [Numbers](#numbers)
19+
- [Built-in Functions](#built-in-functions)
20+
- [Variables](#variables)
21+
- [Strings](#strings)
22+
- [Lists](#lists)
23+
- [Booleans & Operators](#booleans--operators)
24+
- [Loops](#loops)
25+
- [If Statements](#if-statements)
26+
- [Functions](#functions)
27+
- [Dictionaries](#dictionaries)
28+
- [Code-Along Sessions](#code-along-sessions)
29+
- [Game Periods](#game-periods)
30+
- [Contributing](#contributing)
31+
- [License](#license)
832

33+
## Introduction
34+
35+
This workshop is intended to be an engaging, full-day, in-person event that introduces participants to the basics of Python programming. The primary goal is to guide participants through building a Rock-Paper-Scissors game by the end of the workshop.
36+
37+
## How to Install
38+
39+
### Downloading Python
40+
41+
Instructions for downloading Python for different operating systems can be found in the [download-python.md](download-python.md) file.
42+
43+
### Downloading a Code Editor
44+
45+
Instructions for downloading a code editor can be found in the [code-editor.md](code-editor.md) file.
46+
47+
## Workshop Overview
48+
49+
### Workshop Goals
50+
51+
- Teach participants the basics of Python programming.
52+
- Build a functional Rock-Paper-Scissors game.
53+
- Encourage interactive learning through theory and practical sessions.
54+
- Reinforce learning with quizzes and small prizes.
55+
56+
### Schedule
57+
58+
The workshop follows a "theory and practical" pattern, alternating between instructional content and hands-on coding exercises. Small quizzes and game periods are interspersed to encourage participation and reinforce learning.
59+
60+
### Requirements
61+
62+
- Participants must bring a laptop.
63+
- The venue will provide internet access.
64+
- Lunch will be provided to participants.
65+
- Small prizes will be given during quiz sections to encourage participation.
66+
67+
## Workshop Content
68+
69+
### How Python Works
70+
71+
Introduction to the Python programming language and its basic principles.
72+
73+
### Data Types
74+
75+
#### Numbers
76+
77+
Understanding and working with numerical data in Python.
78+
79+
#### Built-in Functions
80+
81+
Overview of Python's built-in functions and how to use them.
82+
83+
#### Variables
84+
85+
Introduction to variables and how to store data in Python.
86+
87+
#### Strings
88+
89+
Working with textual data using Python strings.
90+
91+
#### Lists
92+
93+
Using lists to store and manipulate collections of data.
94+
95+
#### Booleans & Operators
96+
97+
Understanding boolean values and using operators in Python.
98+
99+
#### Loops
100+
101+
Using loops to repeat actions and iterate over data.
102+
103+
#### If Statements
104+
105+
Conditional statements and decision-making in Python.
106+
107+
#### Functions
108+
109+
Defining and using functions to organize and reuse code.
110+
111+
#### Dictionaries
112+
113+
Using dictionaries to store and retrieve data using key-value pairs.
114+
115+
### Code-Along Sessions
116+
117+
Participants will follow along with the instructor to write code based on the concepts discussed. The code for these sessions can be found in the `code-along` folder. These sessions are designed to be interactive, with questions and answers encouraged.
118+
119+
### Game Periods
120+
121+
There will be three game periods where participants will work on building and improving their Rock-Paper-Scissors game. Each period will focus on enhancing user experience and refining the code, reinforcing the principles of development and iteration in software development.
122+
123+
## Contributing
124+
125+
We welcome contributions to improve this workshop. Please see our [contributing guidelines](CONTRIBUTING.md) for more information.
126+
127+
## License
128+
129+
This project is open source and available under the [MIT License](LICENSE).

code-editor-instructions.md

-33
This file was deleted.

code-editor.md

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Instructions for Downloading Code Editors
2+
3+
For this workshop, we recommend using either PyCharm or Visual Studio Code (VS Code) as your code editor. Below are the instructions for downloading and installing each of these editors.
4+
5+
## Downloading PyCharm
6+
7+
1. **Visit the PyCharm Download Page:**
8+
- Go to the official PyCharm website: [PyCharm Download](https://www.jetbrains.com/pycharm/download/)
9+
10+
2. **Select Your Operating System:**
11+
- Choose the appropriate version for your operating system (Windows, macOS, or Linux).
12+
13+
3. **Choose the Edition:**
14+
- PyCharm offers both a Professional (paid) version and a Community (free) version. For this workshop, the Community edition is sufficient.
15+
- Click the "Download" button under the Community edition.
16+
17+
4. **Install PyCharm:**
18+
- Once the download is complete, open the installer and follow the on-screen instructions to install PyCharm on your system.
19+
20+
5. **Initial Setup:**
21+
- Launch PyCharm after installation.
22+
- Follow the initial setup wizard to configure your environment.
23+
24+
## Downloading Visual Studio Code (VS Code)
25+
26+
1. **Visit the Visual Studio Code Download Page:**
27+
- Go to the official VS Code website: [VS Code Download](https://code.visualstudio.com/Download)
28+
29+
2. **Select Your Operating System:**
30+
- Choose the appropriate version for your operating system (Windows, macOS, or Linux).
31+
32+
3. **Download and Install VS Code:**
33+
- Click the "Download" button, and once the download is complete, open the installer.
34+
- Follow the on-screen instructions to install VS Code on your system.
35+
36+
4. **Initial Setup:**
37+
- Launch VS Code after installation.
38+
- Install the Python extension for VS Code:
39+
- Click on the Extensions icon in the sidebar (or press `Ctrl+Shift+X`).
40+
- Search for "Python" and click "Install" on the extension developed by Microsoft.
41+
42+
## Additional Resources
43+
44+
- **PyCharm Documentation:** [PyCharm Documentation](https://www.jetbrains.com/pycharm/documentation/)
45+
- **VS Code Documentation:** [VS Code Documentation](https://code.visualstudio.com/docs)
46+
47+
If you have any issues with the installation process, feel free to reach out to the workshop organizers for assistance.
File renamed without changes.

license.md

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 Kudzayi Bamhare
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.PRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

slides/intro.key

-11.1 MB
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

workshop/game.py

+1-122
Original file line numberDiff line numberDiff line change
@@ -1,123 +1,2 @@
1-
import random
2-
import time
3-
4-
class GameBoy():
5-
6-
def rock_paper_scissors(self):
7-
8-
options = ["rock", "paper", "scissors"]
9-
user = ""
10-
11-
cpu_pick = random.choice(options)
12-
13-
while True:
14-
try:
15-
user = int(input("""Pick one:
16-
1. Rock
17-
2. Paper
18-
3. Scissors """))
19-
20-
if user in [1,2,3]:
21-
break
22-
23-
else:
24-
print("Please only select option 1, 2 or 3")
25-
print()
26-
27-
except ValueError:
28-
print("Invalid option, please select a number.")
29-
30-
31-
32-
# rock
33-
def check_rock(cpu_pick):
34-
35-
# win result
36-
if cpu_pick == "scissors":
37-
print("--- CPU selected SCISSORS ---")
38-
return 1
39-
40-
# lose result
41-
if cpu_pick == "paper":
42-
print("--- CPU selected PAPER---")
43-
return 2
44-
45-
# draw result
46-
if cpu_pick == "rock":
47-
print("--- CPU selected ROCK---")
48-
return 0
49-
50-
# paper
51-
def check_paper(cpu_pick):
52-
53-
# win result
54-
if cpu_pick == "rock":
55-
print("--- CPU selected ROCK---")
56-
return 1
57-
58-
# lose result
59-
if cpu_pick == "scissors":
60-
print("--- CPU selected SCISSORS ---")
61-
return 2
62-
63-
# draw result
64-
if cpu_pick == "paper":
65-
print("--- CPU selected PAPER---")
66-
return 0
67-
68-
# scissors
69-
def check_scissors(cpu_pick):
70-
71-
# win result
72-
if cpu_pick == "paper":
73-
print("--- CPU selected PAPER---")
74-
return 1
75-
76-
# lose result
77-
if cpu_pick == "rock":
78-
print("--- CPU selected ROCK---")
79-
return 2
80-
81-
# draw result
82-
if cpu_pick == "scissors":
83-
print("--- CPU selected SCISSORS ---")
84-
return 0
85-
86-
# user selects rock
87-
if user == 1:
88-
print("*** YOU chose ROCK ***")
89-
time.sleep(2)
90-
result = check_rock(cpu_pick=cpu_pick)
91-
time.sleep(2)
92-
93-
# user selects paper
94-
if user == 2:
95-
print("*** YOU chose PAPER ***")
96-
time.sleep(2)
97-
result = check_paper(cpu_pick=cpu_pick)
98-
time.sleep(2)
99-
100-
# user selects scissors
101-
if user == 3:
102-
print("*** YOU chose SCISSORS ***")
103-
time.sleep(2)
104-
result = check_scissors(cpu_pick=cpu_pick)
105-
time.sleep(2)
106-
107-
# Game result
108-
if result == 1:
109-
print()
110-
print(" ``` You WIN!!! ``` ")
111-
112-
if result == 2:
113-
print()
114-
print(" ``` You LOSE!! ``` ")
115-
116-
if result == 0:
117-
print()
118-
print(" ``` It's a DRAW!!! ``` ")
119-
120-
my_game = GameBoy()
121-
122-
my_game.rock_paper_scissors()
1+
# Build out your rock, paper, scissors game in this file
1232

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)