Skip to content

make_something

Mountain maker

Move the slider. The picture changes, and so does the Python underneath it. That is the whole point: the code is not a mystery, it is the thing making the picture, and you can watch which part does what.

When you like what you have made, copy the code and run it for real.

what it is made of

what it makes

the python that makes it

This is real Python, not a picture of Python. Copy it into a Python editor on your phone and it will print exactly what you see on the left.

Things to notice while you play

Drag the slider slowly and watch the number in the code change at the same time. That number is called a variable. You are editing a program without typing any code, which is a fair description of what a lot of programming actually is.

Now look at the line with the stars on it. Notice that the number of characters goes 1, 3, 5, 7, never an even number. That is what makes the sides slope evenly. Change the size and the pattern holds, because the rule is written down rather than drawn by hand.

Change the character. Only one place in the code changes. That is why programmers put things in variables at the top: so there is one place to change, not fifty.

next

Now run it yourself

Playing with a slider is not programming. Typing it in and getting it to run is. The full lesson is here, and this tool made the code for you already.

All the things you can make

your_progress

Played with it? Tick it off.

Kept in this browser only. No account, no sign up, and nothing about you reaches us.