Values change as the program runs
A program is a list of exact instructions that a computer follows one after another, very fast and without ever guessing what you meant. A programming language like Java lets humans write those instructions in words, and a tool translates them into the numbers the computer's chip understands.
Change the code and press Run (Ctrl+Enter). Try to predict the output first, then break it on purpose and read the error. Your edits are saved and match the lesson page.
Practice questions
Write the code in the editor, run it, then open the model answer to compare.
Write a program that prints your morning routine in four numbered steps.
Write a program that stores the price of one pencil (5) and the number of pencils (7), then prints the total cost.
Write a program that starts with 100 points, loses 30, gains 45, and prints the points after each change.
Explain it without notes
Explain what a program is to someone who has never used a computer.
Why can't we write programs directly in the language a CPU understands?
What is the difference between an error the compiler shows you and a logic bug?
Describe input, processing and output for a calculator app.
Expected output
Start: 10
After gift: 15
After snack: 12
After doubling: 24