Course Content
Course Syllabus & Exams
0/1
Week 33 – End of Year 1 Mock Exam (Paper 1 Theory)
0/1
Week 34 – End of Year 1 Mock Exam (Paper 2 Programming)
0/1
Week 43 – Identifying Types of Database & Understanding Database Structures
0/4
Week 51 – Robotics in the Home & Programming Challenge 15
0/3
Week 52 – Assistance Robots for Disabilities
0/2
Week 53 – The Impact of Plagiarism
0/2
Week 54 – Artificial Intelligence
0/2
Week 55 – Exam Paper Walkthrough (Paper 1 Theory)
0/1
Week 56 – Exam Paper Walkthrough (Paper 2 Programming)
0/1
iGCSE Computer Science – Self-Paced
About Lesson
IntroductionData Types VideoData Type DefinitionsProgramming ActivityDiscussion Activity

There are five main data types that are used at GCSE, and as a part of your course (and later your exam) you will be expected to understand how they work and when it is most appropriate to use them. Creating practice programs on a regular basis is the best way to do this – although we are introducing data types this week, we will be referring back to each of these five types regularly throughout the course.

The video below has been included for those of you who have already been programming in Python for a while – this was originally in week 2 of the course. If you are brand new to programming, please skip this! – (We’ll come back to this later)

The definitions below will give you the basic knowledge needed to use these data types, but I strongly recommend that you complete the full Data Types section to give you more information and practical ways to apply your knowledge.

Char – a single character (symbol)

String – one or more characters, often forming a word or phrase

Integer – a whole number

Real – a decimal number (aka. a float)

Boolean – a special type that only holds either True or False

Activity

Try using the python below to test the data types of each piece of code (you can change & run the code directly on this webpage – to save any code that you change, either copy it into your own coding program or use the python editor above:

#the names that I've used for the variables below are not good practice! They have been named this way to hide the data types from you

variable1 = 'a'
variable2 = "Hello"
variable3 = 42
variable4 = 42.5
variable5 = True

#try adding more print lines to check the data type of each variable
print(type(variable1))
Python

Discussion

Add to the discussion in the “Comments” section above – identify the different data types that we use everyday. Try to add an example that hasn’t been suggested yet.

Digital NotesPython Editor

Join the conversation
Caleb Pickering 8 months ago
Sorry, we don't understand what we are supposed to do for the programming activity in data types?
Reply
Holly Billinghurst 8 months ago
No need to apologise! I've added a few hints below & updated this so that you can see the practice code straight away. There are 5 variables in the program code called variable1, variable2... the name of a variable is also called an "identifier". It's important that these are meaningful so that when future you, or another programmer looks at your code they will understand what it does without having to puzzle it out. So as an example, variable1 holds the data 'a' which is a single character, or char. A better identifier/name for this could be exampleChar so that other programmers know what it does.
0% Complete
Verified by MonsterInsights