[Programming (AQA 8525): includes Data Types, Programming Constructs, Arithmetic Operations, Relational Operations, Boolean Operations, Data Structures, Input and Output, String Handling Operations, Random Number Generation, Structured Programming and Robust and Secure Programming] This detailed se...
2: Programming
For the programming section (forming half of the content for your Paper 1), you need to be
able to both read and understand code, in your assigned programming language and in
pseudocode. All the required programming concepts will be detailed in this guide, though it is
important that you practise your programming skills yourself to fully grasp the concepts, as
this is quite a practical topic. A key skill with this topic is to use logic to formulate algorithms
to solve different problems. (This is covered in more detail in Topic 1.)
Example code is given in all three specified languages: C# (Paper 2A), Python (Paper 2B),
VB.NET (Paper 2C). Only stick to the programming language you are being taught; the
exam you are given will only allow you to use that language (+ pseudocode). You will not have
to learn all three, thankfully.
NB
Even if your language does not have a specified aspect in-built which you should learn (e.g.
Python and constants, repeat-until/do-while loops), you still need to learn the concept for
the exam. Questions involving these may, and probably will, come up; perhaps in
pseudocode questions, or just conceptual questions.
Before You Read Section 2: Programming
Please note that the pseudocode used in this section is based on AQA’s standard. Please refer
to the pseudocode notes and guidance for more information:
Pseudocode https://filestore.aqa.org.uk/resources/computing/AQA-8525-NG-PC.PDF
Please note that the code used in this section is based on AQA’s standard. Please refer to the
notes and guidance for each language below for more information:
C# https://filestore.aqa.org.uk/resources/computing/AQA-8525-NG-CHASH.PDF
Note also that for placeholder identifiers, placeholder data types and placeholder data in
some pieces of code, capitalised Backus-Naur Form is used (you don't need to know this!)
Examples:
<IDENTIFIER>
<DATA TYPE>
<DATA>
Finally, code in this book is coloured using the following rules:
Construct Colour Example
variable/data structure Green myVariable
identifiers
2.1 Data Types
Section objectives
2.1.1 Understand the concept of a data type.
2.1.2 Understand and use the following appropriately:
● integer
● real
● Boolean
● character
● string
A data type specifies what sort of data the computer should interpret.
There are five data types you need to know, as well as their names in the programming
language you’re studying.
Integer
A whole number, i.e. without a decimal (e.g. 420, 12, -73)
Language Code
C# int
Python int
VB.NET Integer
Real Number
Real numbers, also commonly known as “floats” or “double” is a number with a decimal point
(e.g. 3.141, -0.0004, 75.0)
Character
A value made up of one character (e.g. ‘A’).
Language Code Notes
C# char Use single quotes: ‘A’
Python N/A Use strings. Python does not have a
character data type
VB.NET Char
String
A value made up of a varying range of characters.
Language Code Notes
C# string Use double quotes: “Andrew”
Python str Either single or double quotes pairs can
be used. However, make sure that the
start and end match, and use single
quotes inside double quotes if needed.
VB.NET String
NB
● Make sure you know the exact names for each data type in your language; this will
help with data type conversion and variable initialisation (in C# and VB.NET)
● VB.Net is case insensitive, meaning that capitalization for standard VB.Net syntax is
optional. However, it is common practice to capitalise the first letter in VB.Net.
● A list/array is a data structure, not a data type. These are explained in Section 2.6.
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller juddbayona. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $8.01. You're not tied to anything after your purchase.