PROGRAMMING FOUNDATIONS · 6 MIN
What is Programming?
A program is a precise list of instructions a computer follows, top to bottom.
PYRA explains
- A computer cannot guess. It does exactly what you write, in the order you write it.
- Python reads your file line by line. Each line is one instruction, called a statement.
- print() is a built-in function that shows a value on the screen.
Real world: A recipe: if the steps are out of order or vague, the dish fails. Code is a recipe for a machine.
Code
print("Hello, Cubix!")
print(2 + 3)Output ›
Hello, Cubix!
5Try it in the online compiler →Checkpoint quiz
In what order does Python run statements in a simple file?
What does print(2 + 3) show?