Skip to content

Commit 4b40045

Browse files
committed
Updated Python projects
1 parent d1afc5c commit 4b40045

File tree

415 files changed

+4549
-1214
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

415 files changed

+4549
-1214
lines changed

en-GB/en-GB_archive.manifest

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
{
2+
"description": "Archived Python Projects",
3+
"id": "python",
4+
"language": "en-GB",
5+
"number": 20,
6+
"title": "Archived Python Projects",
7+
"category": "cat-python",
8+
"projects": [
9+
{
10+
"number": 1,
11+
"filename": "lessons/ASCII Art/ASCII Art.md",
12+
"note": "lessons/ASCII Art/ASCII Art - notes.md"
13+
},
14+
{
15+
"number": 2,
16+
"filename": "lessons/The Year 2025/The Year 2025.md",
17+
"note": "lessons/The Year 2025/The Year 2025 - notes.md"
18+
},
19+
{
20+
"number": 3,
21+
"filename": "lessons/Quiz/Quiz.md",
22+
"note": "lessons/Quiz/Quiz - notes.md"
23+
},
24+
{
25+
"number": 4,
26+
"filename": "lessons/Turtle Power/Turtle Power.md",
27+
"note": "lessons/Turtle Power/Turtle Power - notes.md"
28+
},
29+
{
30+
"number": 5,
31+
"filename": "lessons/Gameshow/Gameshow.md",
32+
"note": "lessons/Gameshow/Gameshow - notes.md"
33+
},
34+
{
35+
"number": 6,
36+
"filename": "lessons/Compliment Generator/Compliment Generator.md",
37+
"note": "lessons/Compliment Generator/Compliment Generator - notes.md"
38+
},
39+
{
40+
"number": 7,
41+
"filename": "lessons/Teaching Turtles/Teaching Turtles.md",
42+
"note": "lessons/Teaching Turtles/Teaching Turtles - notes.md"
43+
},
44+
{
45+
"number": 8,
46+
"filename": "lessons/Text-speak Converter/Text-speak Converter.md",
47+
"note": "lessons/Text-speak Converter/Text-speak Converter - notes.md"
48+
},
49+
{
50+
"number": 9,
51+
"filename": "lessons/Pokedex/Pokedex.md",
52+
"note": "lessons/Pokedex/Pokedex - notes.md"
53+
}
54+
]
55+
}
56+

en-GB/en-GB_python1.manifest

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,33 +8,33 @@
88
"projects": [
99
{
1010
"number": 1,
11-
"filename": "lessons/ASCII Art/ASCII Art.md",
12-
"note": "lessons/ASCII Art/ASCII Art - notes.md"
11+
"filename": "lessons/About Me/About Me.md",
12+
"note": "lessons/About Me/About Me - notes.md"
1313
},
1414
{
1515
"number": 2,
16-
"filename": "lessons/The Year 2025/The Year 2025.md",
17-
"note": "lessons/The Year 2025/The Year 2025 - notes.md"
16+
"filename": "lessons/Rock Paper Scissors/Rock Paper Scissors.md",
17+
"note": "lessons/Rock Paper Scissors/Rock Paper Scissors - notes.md"
1818
},
1919
{
2020
"number": 3,
21-
"filename": "lessons/Quiz/Quiz.md",
22-
"note": "lessons/Quiz/Quiz - notes.md"
21+
"filename": "lessons/Turtle Race/Turtle Race.md",
22+
"note": "lessons/Turtle Race/Turtle Race.md"
2323
},
2424
{
2525
"number": 4,
26-
"filename": "lessons/Turtle Power/Turtle Power.md",
27-
"note": "lessons/Turtle Power/Turtle Power - notes.md"
26+
"filename": "lessons/Team Chooser/Team Chooser.md",
27+
"note": "lessons/Team Chooser/Team Chooser - notes.md"
2828
},
2929
{
3030
"number": 5,
31-
"filename": "lessons/Gameshow/Gameshow.md",
32-
"note": "lessons/Gameshow/Gameshow - notes.md"
31+
"filename": "lessons/Colourful Creations/Colourful Creations.md",
32+
"note": "lessons/Colourful Creations/Colourful Creations - notes.md"
3333
},
3434
{
3535
"number": 6,
36-
"filename": "lessons/Compliment Generator/Compliment Generator.md",
37-
"note": "lessons/Compliment Generator/Compliment Generator - notes.md"
36+
"filename": "lessons/Secret Messages/Secret Messages.md",
37+
"note": "lessons/Secret Messages/Secret Messages - notes.md"
3838
}
3939
],
4040

en-GB/en-GB_python2.manifest

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,33 +8,33 @@
88
"projects": [
99
{
1010
"number": 1,
11-
"filename": "lessons/Secret Messages/Secret Messages.md",
12-
"note": "lessons/Secret Messages/Secret Messages - notes.md"
11+
"filename": "lessons/Modern Art/Modern Art.md",
12+
"note": "lessons/Modern Art/Modern Art - notes.md"
1313
},
1414
{
1515
"number": 2,
16-
"filename": "lessons/Teaching Turtles/Teaching Turtles.md",
17-
"note": "lessons/Teaching Turtles/Teaching Turtles - notes.md"
16+
"filename": "lessons/Popular Pets/Popular Pets.md",
17+
"note": "lessons/Popular Pets/Popular Pets - notes.md"
1818
},
1919
{
2020
"number": 3,
21-
"filename": "lessons/Text-speak Converter/Text-speak Converter.md",
22-
"note": "lessons/Text-speak Converter/Text-speak Converter - notes.md"
21+
"filename": "lessons/RPG/RPG.md",
22+
"note": "lessons/RPG/RPG - notes.md"
2323
},
2424
{
2525
"number": 4,
26-
"filename": "lessons/Pokedex/Pokedex.md",
27-
"note": "lessons/Pokedex/Pokedex - notes.md"
26+
"filename": "lessons/ISS/ISS.md",
27+
"note": "lessons/ISS/ISS - notes.md"
2828
},
2929
{
3030
"number": 5,
31-
"filename": "lessons/RPG/RPG.md",
32-
"note": "lessons/RPG/RPG - notes.md"
31+
"filename": "lessons/Robo-Trumps/Robo-Trumps.md",
32+
"note": "lessons/Robo-Trumps/Robo-Trumps.md"
3333
},
3434
{
3535
"number": 6,
36-
"filename": "lessons/Minecraft2D/Minecraft2D.md",
37-
"note": "lessons/Minecraft2D/Minecraft2D - notes.md"
36+
"filename": "lessons/CodeCraft/CodeCraft.md",
37+
"note": "lessons/CodeCraft/CodeCraft - notes.md"
3838
}
3939
]
4040
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
title: About Me — Notes for Club Leaders
3+
language: en
4+
embeds: "*.png"
5+
...
6+
7+
#Introduction:
8+
In this project, children will learn how to write a Python program telling people all about themselves. They will create ASCII art (images from text) and perform calculations based on user input.
9+
10+
#Online Resources
11+
12+
__This project uses Python 3.__ We recommend using [trinket](https://trinket.io/) to write Python online. This project contains the following Trinkets:
13+
14+
+ [New (blank) Python Trinket -- jumpto.cc/python-new](http://jumpto.cc/python-new)
15+
16+
There is also a trinket containing the completed project:
17+
18+
+ [‘About Me’ Finished -- trinket.io/python/a1f663ae0d](https://trinket.io/python/a1f663ae0d)
19+
20+
#Offline Resources
21+
This project can be [completed offline](https://www.codeclubprojects.org/en-GB/resources/python-working-offline/) if preferred. You can access the project resources by clicking the 'Project Materials' link for this project. This link contains a 'Project Resources' section, which includes resources that children will need to complete this project offline. Make sure that each child has access to a copy of these resources. This section includes the following files:
22+
23+
+ about/about.py
24+
25+
You can also find a completed version of this project in the 'Volunteer Resources' section, which contains:
26+
27+
+ about-finished/about.py
28+
29+
(All of the resources above are also downloadable as project and volunteer `.zip` files.)
30+
31+
#Learning Objectives
32+
+ Sequencing;
33+
+ Variables;
34+
+ Converting between text and integer (whole number) data types.
35+
36+
#Challenges
37+
+ What's on your mind? - writing a first Python program using the `print` statement.
38+
+ "About yourself" - printing text and ASCII art to the screen. __Remember that the code children write in Trinket is public. Remind them not to share any personal information like their full name or address.__
39+
+ "Your age in dog years" - performing a calculation based on the user's input.

en-GB/lessons/About Me/About Me.md

Lines changed: 171 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
1+
---
2+
title: About Me
3+
level: Python 1
4+
language: en
5+
stylesheet: python
6+
embeds: "*.png"
7+
materials: ["project-resources/*.*", "volunteer-resources/*.*"]
8+
...
9+
10+
#Introduction: { .intro}
11+
12+
In this project you will learn how to write a Python program telling people all about you.
13+
14+
<div class="trinket">
15+
<iframe src="https://trinket.io/embed/python/a1f663ae0d?outputOnly=true&start=result" width="600" height="500" frameborder="0" marginwidth="0" marginheight="0" allowfullscreen>
16+
</iframe>
17+
<img src="me-final.png">
18+
</div>
19+
20+
#Step 1: Saying hello { .activity}
21+
22+
Let's start by writing some text.
23+
24+
## Activity Checklist { .check}
25+
26+
+ Open the blank Python template Trinket: <a href="http://jumpto.cc/python-new" target="_blank">jumpto.cc/python-new</a>. If you're reading this online, you can also use the embedded version of this trinket below.
27+
28+
<div class="trinket">
29+
<iframe src="https://trinket.io/embed/python/33e5c3b81b?start=result" width="100%" height="400" frameborder="0" marginwidth="0" marginheight="0" allowfullscreen></iframe>
30+
</div>
31+
32+
+ Type the following into the window that appears:
33+
34+
![screenshot](me-hi.png)
35+
36+
The line `#!/bin/python3` just tells Trinket that we're using Python 3 (the latest version).
37+
38+
+ Press 'run', and you should see that the `print()` command prints everything between the quote marks `''`.
39+
40+
![screenshot](me-hi-test.png)
41+
42+
+ If you make a mistake, you'll get an error message instead - telling you what went wrong!
43+
44+
Try it! Delete the end quote `'` or the closing bracket `)` (or both) and see what happens.
45+
46+
![screenshot](me-syntax.png)
47+
48+
+ Replace the quote or bracket and click 'run' to make sure your project works again.
49+
50+
## Save Your Project {.save}
51+
52+
__You don't need a Trinket account to save your projects!__
53+
54+
If you don't have a Trinket account, click the down arrow and then click 'Link'. This will give you a link that you can save and come back to later. You'll need to do this every time you make changes, as the link will change!
55+
56+
![screenshot](me-link.png)
57+
58+
If you have a Trinket account, you can click 'remix' to save your own copy of the Trinket.
59+
60+
![screenshot](me-remix.png)
61+
62+
## Challenge: What's on your mind? { .challenge}
63+
Change the code above, to print something more interesting about you!
64+
65+
![screenshot](me-mind.png)
66+
67+
## Save Your Project {.save}
68+
69+
#Step 2: ASCII art { .activity}
70+
71+
Let’s print something much more fun than text… ASCII art! ASCII art (pronounced '_ask-e_') is creating __pictures out of text__.
72+
73+
## Activity Checklist { .check}
74+
75+
+ Let's add some art to your program - a picture of a dog!
76+
77+
![screenshot](me-dog.png)
78+
79+
+ If you click 'run', you'll see that there's a bug in your new code.
80+
81+
![screenshot](me-dog-bug.png)
82+
83+
That's because your text contains a quote, which Python thinks means the end of the text!
84+
85+
![screenshot](me-dog-quote.png)
86+
87+
+ To fix this, just put a backslash `\` before the quote in the word `here's`. This tells Python that the quote is part of the text.
88+
89+
![screenshot](me-dog-bug-fix.png)
90+
91+
+ If you prefer, you can use 3 quotes `'''` instead of 1, which allows you to print multiple lines of text with 1 `print` statement:
92+
93+
![screenshot](me-dog-triple-quote.png)
94+
95+
## Save Your Project {.save}
96+
97+
## Challenge: About yourself { .challenge}
98+
Write a Python program to tell others about yourself, by using text and ASCII art. You can create images of your hobbies, friends… or anything you like!
99+
100+
__Remember that the code you write in Trinket is public. Don't share any personal information like your full name or address!__
101+
102+
Here’s an example:
103+
104+
![screenshot](me-about.png)
105+
106+
## Save Your Project {.save}
107+
108+
#Step 3: The Year 2025 { .activity}
109+
110+
You can also do calculations and print numbers. Let's find out how old you'll be in the year 2025.
111+
112+
## Activity Checklist { .check}
113+
114+
+ To calculate how old you'll be in the year 2025, you need to subtract the year you were born from 2025.
115+
116+
Add this code to your program:
117+
118+
![screenshot](me-calc.png)
119+
120+
Notice that you don't need to put quotes around numbers.
121+
122+
(You'll need to change the number `2006` if you were born in a different year.)
123+
124+
+ Click 'run' and your program should print your age in the year 2025.
125+
126+
![screenshot](me-calc-run.png)
127+
128+
+ You could improve your program by using `input()` to ask the user their age and store it in a __variable__ called `born`.
129+
130+
![screenshot](me-input.png)
131+
132+
+ Run your program and then enter the year you were born. Did you get another error messgae?
133+
134+
That's because anything typed into your program is __text__, and it needs to be converted to a __number__.
135+
136+
You can use `int()` to convert the text to an __integer__ ('integer' means 'whole number').
137+
138+
![screenshot](me-input-test.png)
139+
140+
+ You can also create another variable to store your calculation, and print that instead.
141+
142+
![screenshot](me-result-variable.png)
143+
144+
+ Finally, you can make your program easier to understand by adding a helpful message.
145+
146+
![screenshot](me-message.png)
147+
148+
## Save Your Project {.save}
149+
150+
## Challenge: Your age in dog years { .challenge}
151+
Write a program to ask the user their age, and then tell them their age in dog years! You can calculate a person’s age in dog years by multiplying their age by 7.
152+
153+
![screenshot](me-dog-years.png)
154+
155+
In programming, the symbol for __multiplication__ is `*`, and is usually __shift+8__ on the keyboard.
156+
157+
## Save Your Project {.save}
158+
159+
## Challenge: Calculating text { .challenge}
160+
Did you know that you can also calculate text?!
161+
162+
What does the following program print to the screen? See if you can guess correctly before running the program.
163+
164+
![screenshot](me-text-calc.png)
165+
166+
Can you make up any words of your own? You could even make your own patterns!
167+
168+
![screenshot](me-patterns.png)
169+
170+
## Save Your Project {.save}
171+

en-GB/lessons/About Me/me-about.png

17.8 KB
Loading
19.8 KB
Loading

en-GB/lessons/About Me/me-calc.png

8.67 KB
Loading
16.1 KB
Loading

en-GB/lessons/About Me/me-dog-bug.png

7.32 KB
Loading

0 commit comments

Comments
 (0)