FOUNDATIONS
OF
COMPUTATIONAL
THINKING AND PROGRAMMING
Programming language types
Revision
• What is the difference between ASCII, extended
ASCII and Unicode systems?
• Rather than using binary numbers or 0s and 1s
why don’t computers use decimal numbers just
like us human beings?
• Where are octal and hexadecimal numbers
used?
Learning Objectives
This session will cover programming languages.
1. Overview
2. Different types of programming languages
o Functional
o Scripting
o Logic
o Object-oriented
o Procedural programming
C programming
Functional programming languages
Instead of executing statements,
functional languages focus on
mathematical functions. Each
function performs a specific task
and returns a result. Examples:
Scala
Elixir
Haskell
Scripting Programming Languages
Scripting languages automate
repetitive tasks and manage
dynamic web content.
Examples include:
Python
Ruby
PHP
Perl
Logic Programming Languages
Logic programming
languages express a series
of facts and rules to instruct
computers how to make
decisions
Absys
Datalog
Prolog
Object-oriented Programming Languages
This type of language looks at
one program as a group of
objects. These objects could
be reused and scaled.
Examples include:
Java
Python
C++
Ruby
Procedural programming languages
Procedural programming languages follow a step-by-step approach,
organizing code into functions or procedures to perform tasks. They
emphasize sequence, selection, and iteration to structure programs.
Key features include:
• Modular code: Uses functions to improve reusability.
• Top-down approach: Programs execute in a defined order.
• Global and local variables: Used to store and manipulate data.
Examples include C, Pascal, and Fortran, commonly used for system
programming and embedded systems.
Procedural Programming
Language - C
C Programming Language was developed
in 1972 by Dennis Ritchie at bell
laboratories of AT&T (American Telephone
& Telegraph)
The initial aim for C language was to be
used with UNIX operating system. Thus,
it inherits many features of previous
languages such as B and BCPL.
Dennis Ritchie
Features of C Language
Simple
Extensible Portable
Recursion Mid-level
Features
of C
Structured
Pointers Programming
Language
Memory
Fast
Managemen
Speed
t
Simple C Code
#include <stdio.h>
int main ( )
The program prints
the Hello World!
{
string on the screen
printf(“Hello World! \n”);
return 0;
}
Summary
1. Overview
2. Different types of programming languages
o Functional
o Scripting
o Logic
o Object-oriented
o Procedural programming
§ C programming
Further reading
Goodrich, M. T. et al. (2022) Data Structures and Algorithms in
Java. Wiley
Liang, D. Y. (2021) Introduction to Java Programming and Data
Structures, Comprehensive Version. 12th edn. Pearson
Hunt, A. et al. (2000) The Pragmatic Programmer: From
Journeyman to Master. 1st edn. Addison-Wesley