0% found this document useful (0 votes)
20 views2 pages

Five Fundamental Concepts of Programming Languages

The document discusses five fundamental concepts of programming languages: variables, conditional statements, looping and iteration, data types and data structures, and functions. Variables allow code to operate for any values and have properties like name and value. Conditional statements determine if a variable is true or false. Looping and iteration allow programs to repeat processes until a condition is met. Data types classify variable information and data structures organize multiple items. Functions are self-contained blocks of code that perform tasks.

Uploaded by

pearloasis01
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views2 pages

Five Fundamental Concepts of Programming Languages

The document discusses five fundamental concepts of programming languages: variables, conditional statements, looping and iteration, data types and data structures, and functions. Variables allow code to operate for any values and have properties like name and value. Conditional statements determine if a variable is true or false. Looping and iteration allow programs to repeat processes until a condition is met. Data types classify variable information and data structures organize multiple items. Functions are self-contained blocks of code that perform tasks.

Uploaded by

pearloasis01
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

FIVE FUNDAMENTAL CONCEPTS OF PROGRAMMING LANGUAGES

1. Variables

A variable is a symbolic name or reference to some kind of information. This is similar to how
the term is used in math. For example, if you’re using positive integers, then a + b > a. In this
scenario, a and b are both variables. In computer programming, variables allow code to operate
for any values being represented by variables, but they can be more than just symbolic letters.
Variables can have a number of properties, such as name, type, value, scope, life time, or
location (in a computer’s memory). Different languages call for variables differently, but they all
use the component. You can find more examples here.

2. Conditional statements (“if” statements)

Conditional statements are expressions that ask the program to determine if a variable is true or
false (pro tip: these are known as Boolean values). Typically, if a statement is true, the program
should perform one action, and if a statement is false, the program should perform a different
action. Those actions are called conditions. Read on here and here.

3. Looping and iteration

An iteration is any time a program repeats a process or sequence. Loops are a common type of
iteration, in which a program performs a certain action for an indefinite number of times until a
new condition is met. These are frequently called “while loops,” because they often express that
“while” a certain condition is true, the program should continue to do a certain action until that
condition is false or a new condition is true. Loops also make it possible for programs to do
something else while a given process is running.

4. Data types and data structures

Data types help classify what information a variable can hold and what can be done with it. Data
types include:

 Numbers, (e.g., 7, 3.14).


 Booleans (true or false)
 Characters (‘a’, ‘b’, … ‘z’, ‘1’, ‘2’, … ‘9’, ‘!’, ‘^’, etc)
 Strings (multiple characters strung together — eg. “hello world!”)

Data Structures Include:

 Arrays/Lists (an ordered list of multiple items.)


 Hashes/Dictionaries (an unordered list of key-value pairs)
 Objects (a data structure that encapsulates information and functionality)

Since computer programs can’t tell the difference between data input that reads “1234” and data
input that reads “abcd,” they need to know the data type in order to differentiate between the
two.

Meanwhile, a data structure is also a data type, but one that contains an unlimited number of
named sub-categories. In this way, the program can parse individual data types while still
treating the entire structure as one data type.

5. Functions

Functions are self-contained modules of code that accomplish a particular task. Once a function
is written, it can be called and used repeatedly. They operate like a black box: data goes in, the
function operates on it, and processed data comes out. Functions let you reuse code rather than
constantly rewrite it, and allow you to think about your program as a series of sub-steps.
Functions are also known as routines or subroutines.

Recognizing these five components of a computer language will help you situate yourself when
learning a new language. You’ll be able to pick up new languages faster, and understand how to
manipulate different languages to best produce your program.

You might also like