• Stars
    star
    1,245
  • Rank 36,790 (Top 0.8 %)
  • Language
    Python
  • License
    MIT License
  • Created over 4 years ago
  • Updated 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

100% free and interactive Python course for beginners

MIT license Tests status logo Testing Powered By SauceLabs

futurecoder

This is a 100% free and interactive course for people to teach themselves programming in Python, especially complete beginners at programming. It is carefully designed to reduce frustration and guide the user while still ensuring that they learn how to solve problems. The goal is for as many people as possible to learn programming.

You can try it out here: https://futurecoder.io/

Please consider contributing or donating!

Alternatively, come have a chat on slack.

Features

For a fuller demonstration and explanation, watch this video.

The course is a fully interactive 'book' which requires the user to run code in the provided editor or shell to advance:

full

This requires a mixture of solving problems or simply typing and running provided code. In the latter case, the user is often kept engaged by being asked to predict the output in a simple multiple choice question: The code at each step is checked automatically. If needed, the student can get small hints to gradually guide them to the solution:

predict_output

hints

If they're still really stuck, they can reveal the solution bit by bit:

Or in some cases solve a Parsons problem instead, where they have to put a shuffled solution in the correct order:

solution

parsons

Tracebacks are more helpful than usual, with several enhancements:
  • Highlighting the exact operation that failed, not just the line, using executing
  • Tables of local variables and simple expressions evaluated by pure_eval
  • Suggestions for fixes provided by DidYouMean
  • Beginner friendly explanations provided by friendly-traceback (shown when hovering over the little i icon)
  • Showing multiline statements in full thanks to stack_data without showing unnecessary extra lines
Common mistakes can be caught and pointed out to the student. This includes specific checks in some steps as well as linting tailored for beginners.

traceback

executing

Several debuggers are provided, including snoop...

...birdseye...

snoop

birdseye

...and Python Tutor

pythontutor

Running locally

  1. Fork this repo, git clone it, and enter the top-level futurecoder folder.
  2. Install Python 3.10.2 and poetry.
  3. Run poetry install to install Python dependencies.
  4. Run ./scripts/generate.sh. This will generate various static files from Python used by the frontend and run some tests. Repeat this step whenever you change Python files.
  5. In the frontend folder:
    1. Install node. We recommend using version 16.17.1 (lts/gallium) but there are no known issues with other versions.

    2. Run npm ci to download dependencies.

    3. Run npm run build and then copy service-worker.js from the course folder to the public folder. The service worker is used by sync-message to handle time.sleep and reading from stdin (e.g. input()) in Python. If you want to enable caching (not a good idea when developing), set the environment variable REACT_APP_PRECACHE=1 when building.

    4. Run npm start to start the frontend development server.

  6. Go to http://localhost:3000/course/

To learn more about the system, see the contributing guide.

Controls

To explore the course more freely:

  1. Click the hamburger menu icon in the top left.
  2. Click Settings.
  3. Turn Developer mode on.
  4. This should give you two red buttons floating at the bottom of the screen. They change the currently active step, so you can move forward without having to complete exercises or backwards to test a step again.

More Repositories

1

heartrate

Simple real time visualisation of the execution of a Python program.
Python
1,624
star
2

birdseye

Graphical Python debugger which lets you easily view the values of all evaluated expressions
JavaScript
1,570
star
3

snoop

A powerful set of Python debugging tools, based on PySnooper
Python
927
star
4

sorcery

Dark magic delights in Python
Python
353
star
5

executing

Get information about what a Python frame is currently doing, particularly the AST node being executed
Python
312
star
6

s3-stream-upload

Manages streaming of data to AWS S3 without knowing the size beforehand and without keeping it all in memory or writing to disk.
Java
200
star
7

funcfinder

A tool for automatically solving problems of the form "I need a python function that does X."
Python
165
star
8

instant_api

Instantly create an HTTP API with automatic type conversions, JSON RPC, and a Swagger UI. Just add methods!
Python
126
star
9

stack_data

Python
32
star
10

birdseye-pycharm

IntelliJ IDE plugin for the Python debugger birdseye
Java
31
star
11

pure_eval

Safely evaluate AST nodes without side effects
Python
26
star
12

outdated

Check if a version of a PyPI package is outdated
Python
22
star
13

cheap_repr

Better version of repr/reprlib for short, cheap string representations in Python
Python
21
star
14

friendly_states

Declarative, explicit, tool-friendly finite state machines in Python
Python
19
star
15

nameof

Python function to get the name of a variable or attribute, as in C#
Python
13
star
16

boxes

A library that adds object oriented power to fields, letting you do better than traditional getters and setters.
Java
12
star
17

sunhours

Sketchup plugin for analysing the amount of sunlight hitting points on a surface over the year:
HTML
10
star
18

pyodide-worker-runner

TypeScript
9
star
19

instant_client

Type safe JSON RPC client with automatic (de)serialization. Best paired with instant_api.
Python
7
star
20

jsonfinder

Python library to easily handle JSON contained within strings.
Python
7
star
21

oeis-explorer

Explore related sequences in the OEIS
Python
6
star
22

sync-message

TypeScript
5
star
23

comsync

TypeScript
4
star
24

python_runner

Helper for running python code indirectly
Python
4
star
25

dryenv

Simple DRY configuration with environment variables and pydantic
Python
4
star
26

littleutils

Small personal collection of python utility functions, partly just for fun.
Python
3
star
27

askso

AskSO - StackOverflow Python Question Assistant
Python
2
star
28

datafunctions

Automatic (de)serialization of arguments and return values for Python functions
Python
2
star
29

quiggles

Android app for drawing symmetrical patterns
Kotlin
2
star
30

alexmojaki

2
star
31

dependent_types

Python
1
star
32

case-classes

A framework to refactor computing a result from an aggregate object
Java
1
star
33

trace_augmentation

Python
1
star