Software for Paper 2 Exam:
Programming software is software designed to allow the user to write
computer programs.
Programming Languages:
Programming languages are the words/symbols used to give the
computer instructions to follow. There are 3 main types of programming
language:
High-Level Language – A programming
language that is easy for humans to read
and write because it uses words and
symbols (e.g., Python, Java, C++). These
languages need to be translated into machine code using a compiler
or interpreter.
Assembly Language – A low-level programming
language that uses simple commands instead of
binary code. One command corresponds to
One binary instruction, making it easier to
understand than machine code but still specific
to a type of computer processor. Assembly code needs to be
translated into machine code using an assembler.
Machine Code – The lowest level of
programming language, made up of binary
(1s and 0s). It is the only language a
computer's CPU can directly understand and
execute.
Writing code In Assembly Language
Harder / more time consuming to write
Produces more lines of code
Produces code that could be more efficient
Harder to maintain / update
Can’t use libraries to speed up programming
(Only Advantage) Likely to run very quickly as only needs small
amount of translation.
Machine specific – would need to be re-written for a different
platform
Writing Code In High Level Languages
More use friendly to write
Easier to maintain / update
Can use libraries to simplify some sections
Could be platform independent (depending on specific language
chosen)
(Main Disadvantage) May not run as quickly / code bloat
Programming software: Translators:
Unless code is written as binary, the computer will need to translate the
programming instructions to be able to process them. There are 3 types
of translator.
Assembler: Only translates the low-level language, Assembly
Language into binary.
Interpreter: Directly executes high level instructions line by line,
without translating the whole into machine code first. This allows the
program to start running immediately. The interpreter doesn't
generate an independent file; instead, it requires the original source
code to be interpreted each time it runs the program. The
interpreter stops the first time it finds a syntax error.
Compiler: Translate all of the high-level language program before it
runs. The translation happens all at once, producing an executable
file known as object code which can then be run without needing the
original source code or the need to be compiled again. Also produces
an error log, listing all syntax errors found in the code.
Advantages of Interpreters:
Ease of debugging: Since interpreters execute code line-by-line,
errors can be caught and fixed as soon as they occur, making
debugging easier.
Platform Independence: Interpreters can execute code on any
platform that has the interpreter, providing a level of cross-platform
compatibility.
Real-time execution: Interpreters process and execute code
directly, which mean the program is quick to start and run.
Disadvantages of Interpreters:
Slower Execution overall: Interpreted code typically runs slower
than compiled code because the interpreter needs to translate every
time rather than just once.
No optimisation: Interpreters don’t optimize the code before
execution, so performance may not be as good as with compiled
code.
Advantages of Compilers:
Faster execution overall: Compiled code is generally faster
because it’s already translated into machine code and optimized for
execution.
No dependency on external tools: Once compiled, the program
doesn’t require the compiler to execute, making it easier to
sell/distribute and run on different machines without an interpreter.
Error detection before execution: A compiler checks for syntax
errors before execution, allowing developers to see all errors
together in one go.
Optimization: Compilers often include optimizations that improve
the performance of the code, making it run more efficiently.
Disadvantages of Compilers:
Platform dependence: The compiled code is typically platform-
specific, meaning it needs to be recompiled for different operating
systems or architectures.
No immediate feedback: Errors are found only after the entire
program is compiled, which can make debugging more difficult.
Complex compilation process: The compilation process is more
involved, sometimes requiring extra tools or steps, which can add
complexity.
Programming Software – IDLE’s (Integrated
Development and Learning Environment)
Combines lots of programming software together in one
environment. It provides a simple interface with features that help make
coding easier. Examples are Replit, Thonny, Raspberry Pi Editor
Features:
Editor: An editor is the software where you can write and edit your code.
This is the main screen where you type your programming instructions.
Run-time Environment (SHELL): The run-time environment is the
place where your code runs and allows you to see the results of your
code.
Built-in Translator: Can be an interpreter or a compiler or both – Used
to check your code works and help to find and fix errors.
Syntax Highlighting / Colour Coding: is a feature that changes the
colour of different parts of the code (e.g., keywords, variables, functions)
to make it easier to read and understand.
Code Completion: This is like predictive text and It helps speed up
coding by providing suggestions and reducing errors from typing
mistakes.
Automatic Indentation: Helps ensure that your code is properly
formatted by automatically adding spaces or tabs at the beginning of
lines. Proper indentation is important in languages like Python, where it
defines the structure and flow of the code.
Error Diagnostics: Tools that help identify mistakes or errors in your
code. These tools can show where your code has issues, such as missing
parentheses, wrong syntax, or logical errors, and often suggest possible
fixes.
Online Help: This refers to the ability to access documentation, tutorials,
or FAQs directly from the development environment. It helps users
understand how to use the features of the editor, IDE, or language they
are working with.