Revise Computingrevisecomputing.co.uk
Free student revisionSee questionsFor schoolsSchool enquiry
Free revisionSee questionsFor schoolsSchool enquiry
Knowledge/A Level/H446/01 Computer systems/Types of Programming Language/Procedural languages

Procedural languages

Procedural languages.

1.2.4 Types of Programming Language

Practise exam questions

Types of Programming Language — Note 2 of 5

Candidates need to have knowledge and experience of using a procedural programming language for example Python, VB.NET etc. Candidates need to be experienced in using procedural programming features such as (but not limited to) variables, constants, selection, iteration, sequence, subroutines, string handling, file handling, Boolean and arithmetic operators. Candidates need to be able to read, trace, amend and write procedural program code.

What you need to know

Procedural languages structure a program as a sequence of instructions, grouped into procedures and functions that can be called when needed. Most programming you do in Python follows this paradigm.

What to know

  • Features: variables and constants, selection, iteration, sequence, subroutines, string handling, file handling, and Boolean and arithmetic operators.
  • Programs are executed top-down, calling subroutines as needed.
  • Subroutines make code reusable, easier to test and easier to maintain.
  • Data and the code that processes it are kept separate (unlike OOP, where they are combined in objects).
  • Suitable for problems that can be broken into a clear sequence of steps.

Key terms

Procedural language

A language in which a program is a series of step-by-step instructions, broken down into subroutines (procedures and functions).

Exam technique

  • Tip:You need practical experience of reading, tracing, amending and writing procedural code.

Code examples

Procedural code in Python
python
def calculate_total(prices):
    total = 0
    for price in prices:
        total = total + price
    return total

basket = [2.50, 1.20, 4.00]
print("Total:", calculate_total(basket))

Ready to test yourself?

Practise 1.2.4 questions
← Previous noteThe need for and characteristics of a variety of programming paradigms1.2.4 Types of Programming LanguageNext note →Assembly language and the Little Man Computer instruction set1.2.4 Types of Programming Language

Back to Types of Programming Language

Types of Programming Language

Note 2 of 5

  1. 1The need for and characteristics of a variety of programming paradigms
  2. 2Procedural languages
  3. 3Assembly language and the Little Man Computer instruction set
  4. 4Modes of addressing memory: immediate, direct, indirect and indexed
  5. 5Object-oriented languages: classes, objects, methods, attributes, inheritance, encapsulation, polymorphism
Topic overview