No history yet

Programming Vocabulary

Core Programming Vocabulary

Every field has its own language, and programming is no different. To write code or even just talk about it, you need to know the core vocabulary. These are the building blocks for understanding how software is created.

algorithm

noun

A step-by-step set of instructions for a computer to follow to solve a problem or complete a task.

Think of an algorithm as a recipe. It lists the exact steps you need to follow to get from your ingredients (input) to your finished dish (output). A simple algorithm might describe how to find the largest number in a list, while a complex one could power a search engine.

variable

noun

A named container for storing a piece of data that can change during a program's execution.

Imagine a variable as a labeled box where you can put information. You can put a number, a word, or other types of data inside. The label (the variable's name) lets you find and use that information later.

# In this example, 'score' is the variable
# and 100 is the value it holds.
score = 100

# We can change the value later
score = 150

function

noun

A reusable block of code that performs a specific task. It can be 'called' or executed from other parts of the program.

Functions help keep code organized and prevent repetition. Instead of writing the same lines of code over and over, you can write them once inside a function and then call that function whenever you need it.

# Define a function that greets a person
function greet(name):
  print("Hello, " + name)

# Call the function with different inputs
greet("Alice")
greet("Bob")

The main idea of a function is to group code that does one specific thing. This is a key principle of writing clean, manageable programs.

loop

noun

A control structure that repeats a block of code until a certain condition is met.

Loops are essential for automating repetitive tasks. Without them, if you wanted to do something 100 times, you'd have to write the same code 100 times. A loop does it for you.

# This loop prints numbers 0 through 4
for i in range(5):
  print(i)

array

noun

A data structure that stores a collection of items, typically of the same type, in an ordered sequence.

An array is like a list or a row of numbered mailboxes. Each item in the array has a position, called an index, that you can use to access it. In most programming languages, the first item is at index 0.

# An array of strings
shoppingList = ["apples", "bread", "milk"]

# Access the first item (at index 0)
print(shoppingList[0]) # This will print "apples"

Object-Oriented Concepts

Many modern programming languages use a style called Object-Oriented Programming (OOP). It's a way of thinking about problems by modeling real-world things as 'objects'. This approach uses a few special terms.

class

noun

A blueprint or template for creating objects. It defines the properties (data) and methods (functions) that its objects will have.

A class doesn't do anything by itself. It's just the plan. For example, a Dog class might define that all dogs have a name and can bark().

object

noun

A specific instance of a class. It is a concrete entity created from the class blueprint.

If a class is the blueprint, an object is the actual house built from that blueprint. You can create many objects from one class. For instance, you could use your Dog class to create two different dog objects: one named 'Fido' and another named 'Rover'.

# Define a simple class
class Dog:
  def __init__(self, name):
    self.name = name
  
  def bark(self):
    print("Woof!")

# Create two objects (instances) of the Dog class
dog1 = Dog("Fido")
dog2 = Dog("Rover")

# Call a method on an object
dog1.bark() # This will print "Woof!"

inheritance

noun

A mechanism where one class (the child) acquires the properties and methods of another class (the parent).

Inheritance allows you to create a new class that is a more specific version of an existing class. This promotes code reuse. For example, you could have a general Animal class, and then a Cat class that inherits from Animal. The Cat class would automatically have all the properties of an Animal, plus its own unique ones, like a purr() method.

From Code to Program

Once the code is written, a couple of important steps are needed to turn it into a working application.

compilation

noun

The process of translating source code, written in a high-level programming language, into a low-level language (like machine code) that the computer can execute directly.

Computers don't understand programming languages like Python or C++. They only understand machine code, which is a series of ones and zeros. A special program called a compiler handles this translation. Not all languages are compiled; some, like Python, are interpreted, which means they are translated line-by-line as the program runs.

debugging

noun

The process of finding and fixing errors, or 'bugs', in a computer program's source code.

Bugs can cause a program to crash, produce incorrect results, or behave in unexpected ways. Debugging is a critical part of software development. Programmers use tools called debuggers to step through their code line by line to find the source of the problem.

Ready to check your understanding?

Quiz Questions 1/6

What is the best definition of an algorithm in programming?

Quiz Questions 2/6

In most programming languages, the first element of an array is located at which index?

Knowing these terms is the first step toward reading, writing, and understanding code. They are the foundation upon which all programming concepts are built.