You are here: Kinds of code · Python

First language

A .py file is just text with a label on the end.

Python is a recipe format the computer already knows. You will start with print, input, and a sticky note called a variable. If, loops, lists, and functions wait for weeks 2 and 3. This page does not dump them.

Sticky notes

Tap a note. The value changes. That is all a variable is: a labeled scrap that can hold a new thing later.

What Python is good at here

Tiny tools. Questions and answers. Reading a battery number. Writing a to-do line into a file. All of that can live in Termux.

What it is not: the usual language of Play Store apps. Those later rooms speak Kotlin or Java.

The first three lines

print shows text.

input asks a question and waits.

name = ... parks the answer on a sticky note.

Type them in Stage 3 →

Later, not now

Week 2: if/else (choices), loops (repeat this), lists (a row of sticky notes). Week 3: functions (a named mini-recipe) and files. Come back to those words when a practice page names them.