GithubHelp home page GithubHelp logo

python-curriculum's Introduction

Code Club Python Curriculum

This repository contains the Code Club Python curriculum. It consists of lesson notes and plans in markdown format along with Python project files.

More information on our curriculum can be found here.

New Projects

If you're a club leader trying out new projects, please complete this short questionnaire (or email [email protected]) to let us know how it went!

Contributing

This material is openly available for everyone to use and contribute to. Right now, we’re receiving translations from all over the world.

Instructions on how to contribute to our curriculum can be found here.

You should switch to the correct branch to contribute. The content for the projects.codeclubworld.org can be found in the master branch and the content for the codeclubprojects.org site can be found in the new-layout branch.

python-curriculum's People

Contributors

andylolz avatar bennuttall avatar bjartwolf avatar bseymour avatar codecleaner avatar drtortoise avatar ehermann avatar einarwh avatar erikhenrique avatar gahjelle avatar ipedrazas avatar jafine avatar jaime2nba avatar jaquetrevizan avatar jarodyv avatar jgwhite avatar jonic avatar jrmhaig avatar lgmoneda avatar manasystemizer avatar martinpeck avatar minttusofia avatar rich-tea-ok avatar rik-cross avatar robert-ancell avatar rodolfoghi avatar tef avatar tomstuart avatar vitalbear avatar vivienbarousse avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

python-curriculum's Issues

Introducing the repl

I believe the REPL should be introduced in the assignments, but I guess there are pro's and con's here. I think it would be cool to introduce for example the random functions in the REPL first, so that students could play with them without the more complex context of drawing and functions and all that.

Year 2025 (Project 2) pdf print layout

When printing the PDF of Year 2025, the first page only contains the title and the rest of the project spills onto page 2.

This was on a PC running Windows 7 and via Chrome as the browser.

French "About Me" Volunteer Notes page missing background image

The French version of the About Me project volunteer notes page (https://codeclubprojects.org/fr-FR/python/about-me/About%20Me%20-%20notes.html) is missing the background image (green wavy background). The large_banner.png is present in the root of the fr-FR folder (new-layout branch) and shows up on the project and materials page so the issue seems related to the template used to render the Volunteer Notes page.

Inspection of the html file show the image url as /fr/python/large_banner.png:

<header class="page" style="background: url(/fr/python/large_banner.png); background-repeat: repeat !important;">

whereas the project page shows the url as /fr-FR/python/large_banner.png.

<header class="lesson" style="background: url(/fr-FR/python/large_banner.png); background-repeat: repeat !important;">

Thx.

Build script does not support multiple languages

The build tool currently needs a rewrite to support more languages (which I can see has not been required until now). I am in the process of creating the Norwegian translation of the curriculum.

It is not a critical issue as now, as I'll just keep a local version of the build tool, but there should be a more generic approach also for customizing logo's/legal etc. and build each language separately.

French "About Me - Materials" page - translation of section titles and links text

The Project Materials page of the French translated project About Me at https://codeclubprojects.org/fr-FR/python/about-me/materials.html needs translation of section titles and of the text corresponding to the links at the right of each document.

The English equivalent has the section titles Project Resources and Volunteer Resources as well as Get text for the different links. The French version shows title and text. It looks like these titles are not part of the project itself but of some other template used to render the site. I can help with translation of these but I would need to know where to change it.

Thx!

Indentation in screenshots

Some screenshots don't make it obvious whether there should/shouldn't be indentation, as there's no left-margin for reference.

screen shot 2016-09-01 at 13 11 28

Can we have a look through the projects and just make sure there aren't any images that are confusing.

PEP 8 code snippets

All sorts of stuff works in Python, but that doesn’t mean you should do it! The PEP 8 Python Style Guide is excellent for standardising Python code, making it clearer (particularly for beginners). I’d suggest sticking to this style guide for all code snippets in this repo.

To help with this, there are PEP8 linter plugins for most editors.

Typos in French "Materials" page template / translation file

There are typos in the French template / translation file used to render the "Materials" page of projects.

The translation for the volunteer's resources section should read "Ressources des bénévoles" instead of "Ressources des bé né voles" (no spaces after "é" characters). See example at : https://codeclubprojects.org/fr-FR/python/rpg/materials.html

Also, the same typo is found in the word "éventail" on the French Resources page:
https://codeclubprojects.org/fr-FR/resources/

Feedback on Sheet 1

my name is Anne Ryan & I help run a codeclub at Mellor Primary. I had a go at your first Turtle Power worksheet and really enjoyed it. Just wanted to give a little feedback before I forget:

  • it's really well constructed - excellent approach to introducing the basics of program construction- thanks!
  • the worksheet could do with page numbers
  • on bottom of page 1, it should be Go to File-> New File (not window) ?
  • same typo in (2) on top page 2
  • a ":D" half way down page 2 that prob. should not be there
  • maybe just a bit more clarification at beginning of step 4- change "that last program" to "that last program where we drew a square"
    -just before step 6, you could ask a little leading question along the lines of : what do you think will happen to the shape if you keep increasing the number of sides ?

We are hoping to start python with our kids this coming term....

Projects are tightly coupled to tools

This is true for all the curricula, really – but particularly html and python.

We don’t have python installed on the machines we’re using, so I’d rather use repl.it. However, to do that requires heavily editing the project materials just to make them make sense – since they are currently tightly coupled to IDLE.

Guidance for French translation

Hello, I would like to contribute translating Code Club Python resources to french (currently not available on codeclubworld.org).

I followed the procedure at https://github.com/RaspberryPiFoundation/curriculum_documentation/blob/master/contributing.md and cloned this repository and noticed multiple discrepancies between the content of the repository and what is available on codeclubworld.org.

For instance, the fr-FR folder of the repository seems to have some Python content that is 1) not in-line with the english content and 2) not available on codeclubworld.org under "Français".

Also, as another example, the ASCII Art lesson folder of the en-GB folder of the repository contains images of idle that do not match the content at codeclubprojects.org/en-GB/python/about-me/.

Before I start investing time in doing translation, I would like some guidance on how to proceed to ensure I work on the right version of the code.

Thanks and regards.

RPG: Input validation needed

Currently, the program fails when no input is given. This is because of the following line:

move = move.lower().split()

One possible fix is to delay splitting the input until there is something to split:

screen shot 2016-09-14 at 14 34 00

Module 1, Project 4: Team Chooser - print TeamA

In step 2, there's a line of code which prints the contents of TeamA

image

This line then disappears in subsequent screenshots:

image

But is then referenced in Step 3, as a line that can be copied and pasted:

image

As I had deleted it out thinking it was superfluous, I typed it back in instead, so not a huge problem - but some children might have also done this and be looking to copy and paste a line of code which isn't there?

making waves - multiplying strings?!?

instead of teaching this obscure language feature of multiplying strings (which I think most people agree was a big mistake) why not teach something universally useful, like a for loop.

Turtle Race: Change turtle names.

At PyCon UK, a couple of children seemed to be confused by the following line:

red = Turtle()
red.color('red')

When changing colours, the children first tried changing the name of the turtle rather than the colour. Other children changed the colour of the turtle and ended up with:

red = Turtle()
red.color('purple')

As the turtle is named the same as the colour, changing the colours later on also requires the name of the turtle to be changed.

Should we give the turtles actual names, so that there's no confusion?

Python code not rendering properly

I have no idea why this code (in the hangman project) isn't rendering properly... it's no different from other code blocks, as far as I can tell.

thumbnail

Robo-Trumps: Introduction in volunteer notes is for another project.

The introduction for the "Robo-Trumps" project is from "Turtle Race":

https://codeclubprojects.org/en-GB/python/robo-trumps/Robo-Trumps%20-%20notes.html

Contains the introduction:

This project introduces for loops through a fun turtle race game. Loops are used to draw the race track and to make the turtles move a random number of steps each turn. A group of children can each pick a turtle, the one that gets the furthest is the winner.

Use of `import *`

For learning python, import * is confusing, because it makes it impossible to discern what is a built-in and what has been imported. I know that other languages force you to do this, but python doesn’t. So for example:

from random import *
print("You should name your new pet" , choice(["Bob", "Fluffy", "Martin"]))

As a newcomer, I can’t tell what choice is doing or where it has come from. This is clearer, because at least we’re explicit about what’s imported:

from random import choice
print("You should name your new pet" , choice(["Bob", "Fluffy", "Martin"]))

Personally, though, I think this is clearest, since random.choice is self-explanatory.

import random
print("You should name your new pet" , random.choice(["Bob", "Fluffy", "Martin"]))

I started trying to fix all the instances of this, but there are quite a lot.

RPG: Replace room numbers with names.

In the RPG project, the rooms in the room dictionary are coded as numbers:

#a dictionary linking a room to other room positions
rooms = {

            1 : { 'name'  : 'Hall',
                  'south' : 2
                },

            2 : { 'name'  : 'Kitchen',
                  'north' : 1
                }

         }

I've just realised that there's no need for the rooms to be coded as numbers, and in fact using names would make the code clearer:

#a dictionary linking a room to other room positions
rooms = {

            'hall' : { 'name'  : 'Hall',
                         'south' : 'kitchen'
                },

            'kitchen' : { 'name'  : 'Kitchen',
                               'north' : 'hall'
                }

         }

Python issues

We’ve been doing a few of the activities under Python 1. One example that is in front of me is the RPG activity. I open the RPG.py file that has been already made and I get traceback errors. I am using Python 2.6.6 but this happens with Python 3 also.

This also happens in other activities where my students have completed the their coding as per the instructions but they will get either syntax errors or similar traceback errors.

We are using MacBooks running Yosemite.

Please see the attached images.
screen shot 2015-09-07 at 7 42 55 pm
screen shot 2015-09-07 at 7 43 20 pm

Quiz question generator

I have messy/poorly documented code for Moodle quiz (random) question generation https://code.google.com/p/algorithm-quiz/
You can try it http://galvosukykla.lt/testai/ , for example

Some question bank exports (in lithuanian) -- I could make it more i18 during summer.

whitespace before frontmatter considered harmful

A few of the lesson markdown files have whitespace before the frontmatter (e.g. [1], [2], [3]). This causes CodeClub/lesson_format to do Crazy Stuff™ (e.g. here there are lots of files that shouldn’t be.)

UPDATE: I am totally wrong – sorry. Whitespace at the start is not a problem at all. I’m not sure how those files ended up there.

OS license?

It seems like CodeClub's intent is for this content to be open licensed. This would require an open license of some sort. @CodeClubRik I imagine you're the one to ask.

MIT is a favorite of ours at Trinket.

Problems with Worksheets from beta tests.

One and Two

  • Github flavoured markdown doesn't work outside of github
  • Screenshots of IDLE needed.
  • Students wrote in the output window instead of opening a new file.
  • Indentation not visible in the code listings
  • Code Listings spanned over page breaks
  • "Open a new module in the run menu"
  • Indentation wasn't explained
  • IDLE should be started from a desktop shortcut, setting the correct working directory
  • IDLE doesn't add .py to file names
  • Kids didn't know how many angles in a shape, struggled with hexagons.
  • Why am I writing a function if I only do it once?
  • Control-C and the Not Responding Problem

what are fractals

Maybe add some info on what fractals are, how they occur in nature and some cool examples of what we use them for like computer generated landscapes for movies and games

Use of global?

This may be something that has already been discussed(?), but I am somewhat skeptical to the introduction of global in lesson 6 and later. In general, I feel that it is too easy to do bad stuff with global unless you know what you are doing, and that we might be better off never introducing it to the kids?

Unfortunately, the callback methods in Tkinter essentially require you to do either globals or classes (or even weirder things). However, by using the mutable list grid to keep state in lesson 6 and 7 we can get away with never introducing either of them. This abuses some fairly subtle things (local/global scope, immutability/mutability) though, and could cause some confusion for kids who want to try stuff on their own.

I have examples (in Norwegian, but the code should be readable) that avoid global in branches (06No and 07No) at my fork: https://github.com/gahjelle/python-curriculum

For lesson 8 (neat game by the way) one could possibly introduce classes as a means of organizing code? This could tie in quite nicely with what the kids have already learned in Scratch: That code belongs to different "sprites". Does anybody already have any experience with this?

Best,
Geir Arne

ISS - Live tracking

We've had a few bits of feedback about wanting to do live tracking.

We originally avoided this because:

  1. We don't want to flood the api with requests
  2. Trinket actually caches the responses so you have to make a new request (e.g. by adding '?' and a new number to each call.)

We could add a challenge with hints when we migrate and add a warning not to make requests too frequently?

Is there a way to tell trinket not to cache the responses?

"Tried to get to autoupdate ISS position, failed, due to trinket caching URLS, adding a ?a to the url called, and incrementing a, allowed us to plot the ISS as it moved."

"yes. We REALLY wanted to mod the code for live tracking, but it just wouldn't work. Details in reddit quesiton here: https://www.reddit.com/r/learnpython/comments/6gouit/ask_anything_monday_weekly_thread/disc50q/"

Need to cover valid variable names

About Me: When we changed the int to dog years we got an error and it took us a long time to realise that we mustn't have a space in the int name, so 'dogYears' or 'dog', not 'dog years'.

Might be good to cover valid variable names in the python variables ingredient

Project 5

Hot off the presses!

Typo in print on first snippet (missing parentheses. Stupid python 3)

Didn't define out before first usage of it

Bit too much code introduced all at once in step 3, kids just go into copy pasta mode and don't try and understand it as much

Minor confusion "guess the word" - can't actually guess the entire word in one go

Newline input is accepted as a successful guess.

Procedures vs. functions

I think it would be more precise, easier to understand and also more correct if we call it procedures when we have side-effects. I know that this sounds a bit like a purist and we are dealing with kids, but why not try to be correct when there is no real cost to this? The word is even a little bit easier to understand...?

non-Trinket Compatibiity

Some projects may need modifications to run outside Trinket. (And those modifications may not work in Trinket due to limitations in its implementation.)

Would make sense to test all the projects and make sure they run on a Pi with IDLE.

Some Code Clubs are trying to complete the projects on iOS which has also not been tested.

Issues reported for:

Codecraft
ISS

  • "This code is giving an error. This is correct:
    url=""http://api.open-notify.org/astros.json""
    response=urllib.request.urlopen(url).read().decode(""utf-8"")
    result=json.loads(response)"
    (The code in the project runs in Trinket, but the modification is needed elsewhere.)
  • Yes, there are 2 issues. First, screen.bgpic(imagefile) does not support .jpg file. Second, the register_shape(imagefile) only supports .gif file
  • the graphics you provide in the "Project Materials" section are GIF files instead of JPG and PNG as stated in the script.
  • Turtle projects "I dont think this works in trinket.io using Python3 - only Python?" Turtle doesn't work in Python 3 trinkets

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.