About py4kids
py4kids is a free set of Python courses for middle school students. It was written by a teacher for a small class and is shared openly so that anyone can use it. No programming experience is needed to start. Every unit opens with something to build, and the ideas are taught along the way.
The books
- Python by Projects: learn Python by building things.
- Python, Concept by Concept: learn Python one idea at a time.
- Contest Python: USACO Bronze: algorithms for your first programming contests.
- Contest Python: ACSL: from Elementary to Senior, one contest at a time.
Each book has lessons you read or step through as slides, exercises, checkpoints, quiz cards, a glossary and a quick reference. Your progress is saved on your own device only; see the privacy notice.
How checking works
Every exercise says how it is checked:
- a program is run on test inputs, and its output is compared with the expected output (you see the sample input and output; the others stay hidden);
- a short answer, or a prediction of what a program prints, is compared with the expected answer, ignoring extra spaces;
- a function is run by tests, which show whether each one passed;
- an open-ended exercise, such as a free design, has a short checklist that you tick yourself.
Running your code and checking answers in the browser is coming in a later version of the site. Until then, the exercises say how they will be checked, and you can run your programs in Python on your computer.
Hidden answers are a study aid, not a lock
The site keeps some answers out of sight so that you try first: that is where the learning happens. This is a study aid, not security. Everything the site checks against is public by nature: the worked solutions are in the open source repository, and the Teacher's Edition PDFs are published. Someone who wants to find an answer can. Teachers should not use the site's checks for graded tests.
License
The course content is licensed under CC BY-NC-SA 4.0. You may share and adapt it for non-commercial purposes, giving credit to "py4kids" and sharing your changes under the same license. See the terms for the details.
Contact
Parents and teachers can report a problem or ask a question on the project'sGitHub issues page. Issues there are public.