Sonzaschool
Back

O-Level · Secondary 3

ICT

Types of Programming Languages

about 5 minutes to read

Discussions
Topics in this sectionProgramming Languages2 topics
  1. Types of Programming Languages
  2. Similarities and Data Types

When we write a program, we must use a language that the computer can understand. A programming language is a set of rules and symbols that allows humans to give instructions to computers. Different programming languages are designed for different types of tasks, and each language has its own strengths and weaknesses.

Procedural Programming Languages

Procedural programming languages organize code as a list of instructions that the computer follows step by step. The program is written as a sequence of procedures, where each procedure is a block of code that performs a specific task. The programmer tells the computer exactly what to do, in the order in which to do it.

Key features:

  • Programs are made of procedures or functions
  • Uses variables to store data
  • Follows a top-down approach
  • Common examples: C, Pascal, BASIC

When to use: Procedural languages work well for tasks that require clear, step-by-step instructions, such as mathematical calculations or simple system programs.

Object-Oriented Programming Languages

Object-oriented programming (OOP) languages organize code around objects. An object is a collection of data (called properties or attributes) and actions (called methods). Objects are built from classes, which act as blueprints. This approach helps programmers model real-world things and relationships more naturally.

Key features:

  • Uses classes and objects
  • Supports encapsulation (hiding data inside objects)
  • Supports inheritance (creating new classes from existing ones)
  • Supports polymorphism (the same action can work differently for different objects)
  • Common examples: Java, C++, C#, Python, Ruby

When to use: OOP is ideal for building large applications, games, graphical user interfaces, and systems where you need to model complex relationships between different parts.

Scripting Languages

Scripting languages are usually interpreted rather than compiled. They are often used for automating tasks, web development, and quick prototyping. Scripts are typically written and executed without a separate compilation step, making development faster.

Key features:

  • Interpreted (read and executed line by line)
  • Easy to learn and use
  • Good for automation and web scripting
  • Common examples: Python, PHP, JavaScript, Ruby, Perl

When to use: Scripting languages are perfect for web pages, automating repetitive tasks, testing other programs, and building small to medium applications quickly.

Logic Programming Languages

Logic programming languages are based on formal logic. Rather than telling the computer step-by-step what to do, the programmer declares facts and rules, and the computer (reasons) to find answers. This approach is useful for artificial intelligence and problem-solving.

Key features:

  • Based on mathematical logic
  • Declarative (you state what you want, not how to get it)
  • Uses facts and rules
  • Common examples: Prolog, Lisp

When to use: Logic programming is used in expert systems, natural language processing, theorem proving, and AI research.

Functional Programming Languages

Functional programming treats computation as the evaluation of mathematical functions. It avoids changing data (called mutable data) and instead uses pure functions that always produce the same output for the same input. This makes code more predictable and easier to test.

Key features:

  • Functions are the main building blocks
  • No changing of data once created
  • Emphasis on what to compute, not how
  • Common examples: Haskell, Lisp, Erlang, F#

When to use: Functional programming is useful for mathematical computations, concurrent programming, and situations where code reliability is critical.

Question

In South Sudan, a small shop owner in Juba wants to create a simple program to automatically track inventory. Which language would be most suitable according to the lesson?

Sign in to submit your answer and have it count toward your mastery.

Sign in to practice

Tutor

Stuck? Ask me anything about this topic.

Sign in to ask the Sonza AI Tutor about this question.

Sign in to ask

Discussions

No questions yet

Sign in to ask
Loading discussions…