Programming Basics
Every programming language, from Python to Rust, is built from the same handful of ideas: values stored in variables, decisions made with conditionals, work repeated with loops, and logic packaged into functions. Learn this vocabulary once and you can read code in almost any language, because the words change but the concepts do not. This first set covers the terms you will use in literally every program you ever write.
Practice this set for free — no account needed. Loads 16 flashcards into the learner.
Practice in the free learnerHow to study this set
For each concept, picture the smallest possible example — a variable holding your age, an if-statement checking it, a loop counting to ten. Concepts you can instantiate with a tiny example are concepts you actually understand, not just ones you can define.
All 16 flashcards
What is a variable?
A named container that stores a value in a program
What is a function?
A reusable block of code that performs a task, often taking inputs and returning a result
What is a boolean?
A data type with only two possible values: true or false
What is a loop?
A control structure that repeats a block of code
Common forms are the for loop and the while loop.
What does an “if” statement (a conditional) do?
Runs a block of code only when a given condition is true
What is a string?
A sequence of characters — that is, text
What is an integer?
A whole number, with no fractional part
What is an array (a list)?
An ordered collection of values stored under one name and accessed by index
What is a comment in code?
A note for humans that the program ignores when it runs
What does “syntax” mean in programming?
The set of rules governing how code must be written for a language to understand it
What is a bug?
An error or flaw in a program that makes it behave incorrectly
What is debugging?
The process of finding and fixing bugs in a program
What is a parameter (argument) of a function?
An input value passed into the function when it is called
In many languages, what is the difference between “=” and “==”?
“=” assigns a value to a variable; “==” compares two values for equality
What is an algorithm?
A step-by-step procedure for solving a problem
What is a compiler?
A program that translates source code into machine code before it runs
An interpreter, by contrast, runs the code directly, line by line.
What to learn next
With the basic vocabulary down, the next question is how to organise data well. Level 2 introduces the classic data structures — arrays, stacks, queues, hash tables and trees.
Continue to Level 2: Data Structures →