Fundamentals ยท Level 1

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. The learner asks it as shown here: phrase first, meaning second.

Practice in the free learner

How 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

Swap question and answer
A named container that stores a value in a program

What is a variable?

A reusable block of code that performs a task, often taking inputs and returning a result

What is a function?

A data type with only two possible values: true or false

What is a boolean?

A control structure that repeats a block of code

What is a loop?

Common forms are the for loop and the while loop.

Runs a block of code only when a given condition is true

What does an โ€œifโ€ statement (a conditional) do?

A sequence of characters โ€” that is, text

What is a string?

A whole number, with no fractional part

What is an integer?

An ordered collection of values stored under one name and accessed by index

What is an array (a list)?

A note for humans that the program ignores when it runs

What is a comment in code?

The set of rules governing how code must be written for a language to understand it

What does โ€œsyntaxโ€ mean in programming?

An error or flaw in a program that makes it behave incorrectly

What is a bug?

The process of finding and fixing bugs in a program

What is debugging?

An input value passed into the function when it is called

What is a parameter (argument) of a function?

โ€œ=โ€ assigns a value to a variable; โ€œ==โ€ compares two values for equality

In many languages, what is the difference between โ€œ=โ€ and โ€œ==โ€?

A step-by-step procedure for solving a problem

What is an algorithm?

A program that translates source code into machine code before it runs

What is a compiler?

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 โ†’