Expressions, output, and names
The first false picture to remove is that Python begins with files and setup. In this app, the runner already provides Pyodide and an in-app virtual workspace. Your first job is to predict expressions and observe values. +, *, comparisons, strings, lists, and dictionaries are the raw materials. print is an observation tool, not the application's final interface.
Names point at values. Assignment gives a value another name, and a later assignment can point the name somewhere else. Start with short expressions, print their results, and change one input at a time. The run history keeps the output beside the code so you can explain what changed without relying on memory.
The lesson runner selects Pyodide and the virtual workspace. Device paths and native process assumptions are outside this course. Reproduce a result in the app before trusting an explanation.
Pyodide supplies the standard library modules used in this course. Imports still have an order and a name, but there is no native package installation step in the lab. When an import surprises you, print the value or module name in the app run output and inspect the virtual file path shown by the workspace.
Micro-lab in the app
Predict, run, change or break, explain: run this expression, alter one value, and connect the output to the arithmetic.
subtotal = 12
tax_rate = 0.075
print(round(subtotal * (1 + tax_rate), 2))In the app workspace, subtotal = 12 and tax_rate = 0.075. Which expression prints the total with two decimal places?
The app prints names after selected = names and selected.append('Mina'). Why does the original list include Mina?
Notes are kept with your account, alongside your progress and your gate claims. The lesson itself is readable without one.
This lesson has a tool
Open it and get your draft reviewed. Drag-and-drop tools need a wider screen; the review works anywhere.