Python

From drawing with a turtle to apps, games and machine learning.

All Code pathways

Foundations

Python Foundations with Turtle11 lessonsDraw with code: commands, loops, values, choices and lists.◆ 1 projectPython functions and events10 lessonsAfter TurtleBuild with code: functions, modules, events, then your own catch-the-turtle game.◆ 4 projectsConsole bridge: text in, text out11 lessonsAfter Python functions and eventsMake programs that ask questions and answer back.◆ 2 projectsStructure and style a pageWeb pathwayBuild your own web pages and watch them change as you type.

Extensions

Objects with turtles5 lessonsAfter Console bridgeBuild a falling-stars game with lots of turtles.◆ 2 projectsData detective6 lessonsAfter Console bridgeFind the story hiding in a real data set.Deeper Python in the console6 lessonsAfter Console bridgeText, lists and errors, then a text adventure that saves.Apps with Gradio3 lessonsAfter Console bridgeTurn your Python into apps people can click.Web apps with Flask5 lessonsAfter Console bridge and Structure and style a pagePut Python behind your own web pages.Games with microStudio5 lessonsAfter Objects with turtlesMake a real game in a real game engine.Machine learning with Gradio5 lessonsAfter Data detectiveTeach a computer to recognise penguins, then put it in an app.SQL and databases11 lessonsAfter Data detectiveAsk a table a question and get an answer back.Pattern Detector projects1 lessonAfter Apps with GradioBuild an app that sorts things into groups, then makes it useful to someone.◆ 3 projects

Start with Python Foundations with Turtle: commands, loops, variables, decisions and lists. Python functions and events follows: your own functions, modules and events, ending in a game you build in milestones. The console bridge then shows the same logic as text in and text out, and every extension starts from it: deeper Python in the console, web apps with Gradio (then the Pattern Detector projects, the easier way into machine learning: train a model, build an app around it), machine learning inside out after both Gradio and Data detective, and games.

Ideas this pathway adds to the ones every pathway shares: a program that talks, text that looks like a number, data that lasts. See how they build on the shared ideas.

Extensions

Objects with turtlesBuild a falling-stars game with lots of turtles.Build a falling-stars game with many turtles, and tidy it step by step: from separate variables to lists, dictionaries and classes.After: Console bridge: text in, text outData detectiveFind the story hiding in a real data set.A real data set in Python: read a CSV, count, average and find the biggest, draw a bar chart, clean messy data and check it with test cases, then build a dashboard.After: Console bridge: text in, text outDeeper Python in the consoleText, lists and errors, then a text adventure that saves.One idea at a time, in the console: text, lists, dictionaries and errors, then a text adventure built from all of them, saved to a file.After: Console bridge: text in, text outApps with GradioTurn your Python into apps people can click.Turn Python functions into apps with inputs and outputs: a greeter, a calculator with several inputs, and a quiz built from a list of questions, in an in-browser stand-in for Gradio that runs the same code as the real thing.After: Console bridge: text in, text outMachine learning with GradioTeach a computer to recognise penguins, then put it in an app.How a computer learns from examples: rules by hand, a nearest-neighbour model written yourself, fair testing, then scikit-learn and a model behind a Gradio app, with what models get wrong.After: Data detectivePattern Detector projectsBuild an app that sorts things into groups, then makes it useful to someone.Build an app that sorts an input (text, answers, a photo, a pose or a sound) into groups and responds usefully. One short lesson trains a model in the Pattern Trainer and runs it in Python; then three open projects: A uses rules you write, B a model you train, C joins the two. The apps run on your own computer, from the Pattern Detector starters.After: Apps with GradioGames with microStudioMake a real game in a real game engine.Make a real game in Python on microStudio, a free game engine in the browser: a game loop, keys, stars as objects, catching and scoring, then sprites, sound and sharing.After: Objects with turtlesSQL and databasesAsk a table a question and get an answer back.Ask a database questions. Pick the rows and columns you want, filter, sort, count and join, then change the data and design your own tables.After: Data detectiveWeb apps with FlaskPut Python behind your own web pages.Your own HTML pages with Python behind them: routes, pages built from data, forms, saving to a file and JSON, ending with the same API in FastAPI.After: Console bridge: text in, text out and Structure and style a page