2.4.2
Programming Paradigms
Programming Paradigms
Programming Paradigms
There are several different types of programming paradigms to help us solve different types of problems.
![Illustrative background for Programming paradigms](https://image-v2.cdn.app.senecalearning.com/2018-09/367d2671-036c-4319-9fdf-cbbafe79018e/laptop-3087585_1920,h_400,q_80,w_640.jpg)
![Illustrative background for Programming paradigms ?? "content](https://image-v2.cdn.app.senecalearning.com/2018-09/367d2671-036c-4319-9fdf-cbbafe79018e/laptop-3087585_1920,h_400,q_80,w_640.jpg)
Programming paradigms
Programming paradigms
- A programming paradigm is a way of coding to solve a problem.
- We have 4 types of paradigm and each one is geared towards certain types of situations.
- Within each paradigm there are many different programming languages that all offer different things to each other.
- Some programming languages can be used for more than one paradigm.
![Illustrative background for Procedural programming](https://image-v2.cdn.app.senecalearning.com/2020-08/4c40d866-2256-450b-a80c-b042c8385b76/python,h_400,q_80,w_640.jpg)
![Illustrative background for Procedural programming ?? "content](https://image-v2.cdn.app.senecalearning.com/2020-08/4c40d866-2256-450b-a80c-b042c8385b76/python,h_400,q_80,w_640.jpg)
Procedural programming
Procedural programming
- Procedural programming is the most common paradigm of programming language.
- Procedural languages have built in simple data types like string, char, boolean, int and real.
- Procedural languages focus on a set of instructions that are followed through to achieve a desired outcome at the end.
- Python is foremost a procedural language.
![Illustrative background for Object orientated programming](https://image-v2.cdn.app.senecalearning.com/2020-08/ff4ff68e-c91d-4940-acb2-592c8133f3d3/java,h_400,q_80,w_640.jpg)
![Illustrative background for Object orientated programming ?? "content](https://image-v2.cdn.app.senecalearning.com/2020-08/ff4ff68e-c91d-4940-acb2-592c8133f3d3/java,h_400,q_80,w_640.jpg)
Object orientated programming
Object orientated programming
- Object orientated programming came about as developers needed to model real world items that could be copied over and over again but given different attributes.
- An object “class” is set up and shows the attributes (such as colour of a car) and its behaviours (such as engine_start), this class is a blueprint for creating an object.
- Once a class is defined, it can be reused to create “instances” of the object as many times as the developer needs.
- Java and Python are object orientated languages.
![Illustrative background for Declarative programming](https://image-v2.cdn.app.senecalearning.com/2018-08/3203b50d-3d73-4633-aea3-3c454eec8e0c/talk-speech,h_400,q_80,w_640.jpg)
![Illustrative background for Declarative programming ?? "content](https://image-v2.cdn.app.senecalearning.com/2018-08/3203b50d-3d73-4633-aea3-3c454eec8e0c/talk-speech,h_400,q_80,w_640.jpg)
Declarative programming
Declarative programming
- Declarative languages use statements to describe a problem to be solved instead of how to solve the problem.
- The statements are given to the programming language engine, it then figures out how to solve the problem and return a result.
- SQL is a declarative language.
![Illustrative background for Functional programming](https://image-v2.cdn.app.senecalearning.com/2019-09/cfbb00d5-64b5-451b-985c-feff62dbd8a0/programmer-1653351_1280,h_400,q_80,w_640.png)
![Illustrative background for Functional programming ?? "content](https://image-v2.cdn.app.senecalearning.com/2019-09/cfbb00d5-64b5-451b-985c-feff62dbd8a0/programmer-1653351_1280,h_400,q_80,w_640.png)
Functional programming
Functional programming
- In functional programming, functions (not procedures) are the blocks we build programs out of.
- Functions are different to procedures as they have to follow set rules:
- They must take in valid inputs, return an output, and not have any side effects.
- Haskell and Python are examples of languages that can be functional languages.
Procedural Programming Languages
Procedural Programming Languages
Procedural languages are the most common type of programming language.
![Illustrative background for Procedural languages](https://image-v2.cdn.app.senecalearning.com/2018-11/2a76a731-5ef1-4312-b99e-08c182f230c6/netflix-logo-,h_400,q_80,w_640.png)
![Illustrative background for Procedural languages ?? "content](https://image-v2.cdn.app.senecalearning.com/2018-11/2a76a731-5ef1-4312-b99e-08c182f230c6/netflix-logo-,h_400,q_80,w_640.png)
Procedural languages
Procedural languages
- Procedural languages have become more popular.
- Procedural languages now have many libraries of pre-compiled code to use.
- This speeds up the programming process.
- Netflix use the python programming language to manage their systems.
![Illustrative background for Data types and structures](https://image-v2.cdn.app.senecalearning.com/2020-02/b91eb7ed-86d9-4b3e-8c39-8521c1be68ee/data-numbers,h_400,q_80,w_640.jpg)
![Illustrative background for Data types and structures ?? "content](https://image-v2.cdn.app.senecalearning.com/2020-02/b91eb7ed-86d9-4b3e-8c39-8521c1be68ee/data-numbers,h_400,q_80,w_640.jpg)
Data types and structures
Data types and structures
- Procedural languages have built in basic data types such as strings, integers, real numbers, boolean and char.
- Procedural languages also have advanced data structures such as arrays, stacks and queues.
![Illustrative background for Procedures](https://image-v2.cdn.app.senecalearning.com/2018-10/8571813f-872f-4853-8963-57f6406a6866/circle-arrows-system-model-loop-green-arrow-,h_400,q_80,w_640.jpg)
![Illustrative background for Procedures ?? "content](https://image-v2.cdn.app.senecalearning.com/2018-10/8571813f-872f-4853-8963-57f6406a6866/circle-arrows-system-model-loop-green-arrow-,h_400,q_80,w_640.jpg)
Procedures
Procedures
- Procedural language programs are built up of procedures that perform an action.
- The procedures are reusable and make it quicker to program.
1Components of a Computer
1.1Structure & Function of the Processor
1.2Types of Processors
2Software & Software Development
2.1Systems Software
2.2Applications Generation
2.3Software Development
3Exchanging Data
3.1Compression, Encryption & Hashing
3.3Networks
4Data Types, Data Structures & Algorithms
4.1Data Types
5Legal, Moral, Cultural & Ethical Issues
5.1Computing Related Legislation
6Elements of Computational Thinking
6.1Thinking Abstractly
6.2Thinking Procedurally
6.3Thinking Logically
7Problem Solving & Programming
7.1Programming Techniques
7.2Programming Construction
Jump to other topics
1Components of a Computer
1.1Structure & Function of the Processor
1.2Types of Processors
2Software & Software Development
2.1Systems Software
2.2Applications Generation
2.3Software Development
3Exchanging Data
3.1Compression, Encryption & Hashing
3.3Networks
4Data Types, Data Structures & Algorithms
4.1Data Types
5Legal, Moral, Cultural & Ethical Issues
5.1Computing Related Legislation
6Elements of Computational Thinking
6.1Thinking Abstractly
6.2Thinking Procedurally
6.3Thinking Logically
7Problem Solving & Programming
7.1Programming Techniques
7.2Programming Construction
![Go student ad image](/en-GB/revision-notes/_next/image?url=%2Fen-GB%2Frevision-notes%2Fimages%2Fgo-student-uk-ad.jpg&w=640&q=100)
Unlock your full potential with GoStudent tutoring
Affordable 1:1 tutoring from the comfort of your home
Tutors are matched to your specific learning needs
30+ school subjects covered