2.2.6
Data Types
Data Types
Data Types
Every piece of data that is stored has a type. The type determines how it is stored and what you can do with the data.
Integer
Integer
- Whole numbers.
- Examples:
- 12, 0, -142.
Real
Real
- Fractional numbers.
- Examples:
- 0.42, 1.00.
String
String
- Text data.
- Example:
- "Hello, world!".
Character
Character
- A single letter of text data.
- Example:
- 'a'.
Boolean
Boolean
- A True or False value.
- Examples:
- True.
- False.
Casting
Casting
Casting is the process of converting data from one type to another.
Reasons for casting
Reasons for casting
- One of the most common reasons for casting is output.
- Output must be formatted as a string, and so we may need to convert a certain piece of data to a string.
- All input also comes as a string, and must then be converted to other data types.
Casting functions
Casting functions
- Casting to a string can be done using the str function. E.g:
- str(3) gives "3".
- Casting to an integer can be done using the int function. E.g:
- int(3.4) gives 3.
- Casting to a real can be done using the real function. E.g:
- real("3.4") gives 3.4.
1Computer Systems
1.1Systems Architecture
1.2Memory & Storage
1.2.1Types of Memory
1.2.2Flash Memory
1.2.3Virtual Memory
1.2.4Exam-Style Questions - Primary Memory
1.2.5Capacity
1.2.6Solid State Storage
1.2.7Magnetic Storage
1.2.8Examples of Magnetic Storage
1.2.9Optical Storage & its Properties
1.2.10Examples of Optical Storage
1.2.11End of Topic Test - Computer Systems
1.2.12Grade 9 - Storage
1.2.13Exam-Style Questions - Storage
1.2.14Units of Information
1.2.15Number Bases
1.2.16Converting Number Bases
1.2.17Hexadecimal
1.2.18Binary Arithmetic
1.2.19Representing Text
1.2.20ASCII & Unicode
1.2.21Representing Images
1.2.22Representing Sound
1.2.23Data Compression
1.2.24End of Topic Test - Representation
1.2.25Exam-Style Questions -Data Conversions
1.3Computer Networks, Connections & Protocols
1.3.1Benefit of Networks
1.3.2Network Performance
1.3.3Networks: How Do Packets Get Routed?
1.3.4Types of Networks
1.3.5Client-Server Model
1.3.6Pros & Cons of Client-Server Model
1.3.7Peer-to-Peer Model
1.3.8Pros & Cons of Peer-to-Peer Model
1.3.9Network Hardware
1.3.10What is the Internet?
1.3.11URLs
1.3.12DNS & Web Hosting
1.3.13The Cloud
1.3.14Pros & Cons of the Cloud
1.3.15Exam-Style Questions - Networking Models
1.3.16Topology
1.3.17WiFi
1.3.18WiFi Encryption
1.3.19IP Addresses
1.3.20MAC Addresses
1.3.21Network Protocols
1.3.22Application Protocols
1.3.23Layers
1.3.24Advantages of Layering
1.3.25Exam-Style Questions - Network Protocols
1.4Network Security
1.5Systems Software
1.6Ethical, Legal, Cultural & Environmental Concern
1.6.1Open Source vs Proprietary Software
1.6.2Licensing Issues
1.6.3Ethical Issues
1.6.4Ethical Issues 2
1.6.5Exam-Style Questions - Ethical Issues
1.6.6Legal Issues
1.6.7Legal Issues 2
1.6.8Freedom of Information Act (2000)
1.6.9Cultural Issues
1.6.10Environmental Issues
1.6.11Positive Environmental Impact
1.6.12Privacy Issues
1.6.13Stakeholders
1.6.14End of Topic Test - Software & Issues
2Computational Thinking, Algorithms and Programming
2.1Algorithms
2.1.1Computational Thinking
2.1.2Algorithmic Thinking
2.1.3Pseudocode & Flow Diagrams
2.1.4Interpreting & Correcting Algorithm
2.1.5Completing Algorithms
2.1.6Search Algorithms
2.1.7Binary Search
2.1.8Overview of Sort Algorithms
2.1.9Bubble Sort & Insertion Sort
2.1.10Merge Sort
2.1.11Exam-Style Questions - Sorting Algorithms
2.2Programming Fundamentals
2.3Producing Robust Programs
2.4Boolean Logic
Jump to other topics
1Computer Systems
1.1Systems Architecture
1.2Memory & Storage
1.2.1Types of Memory
1.2.2Flash Memory
1.2.3Virtual Memory
1.2.4Exam-Style Questions - Primary Memory
1.2.5Capacity
1.2.6Solid State Storage
1.2.7Magnetic Storage
1.2.8Examples of Magnetic Storage
1.2.9Optical Storage & its Properties
1.2.10Examples of Optical Storage
1.2.11End of Topic Test - Computer Systems
1.2.12Grade 9 - Storage
1.2.13Exam-Style Questions - Storage
1.2.14Units of Information
1.2.15Number Bases
1.2.16Converting Number Bases
1.2.17Hexadecimal
1.2.18Binary Arithmetic
1.2.19Representing Text
1.2.20ASCII & Unicode
1.2.21Representing Images
1.2.22Representing Sound
1.2.23Data Compression
1.2.24End of Topic Test - Representation
1.2.25Exam-Style Questions -Data Conversions
1.3Computer Networks, Connections & Protocols
1.3.1Benefit of Networks
1.3.2Network Performance
1.3.3Networks: How Do Packets Get Routed?
1.3.4Types of Networks
1.3.5Client-Server Model
1.3.6Pros & Cons of Client-Server Model
1.3.7Peer-to-Peer Model
1.3.8Pros & Cons of Peer-to-Peer Model
1.3.9Network Hardware
1.3.10What is the Internet?
1.3.11URLs
1.3.12DNS & Web Hosting
1.3.13The Cloud
1.3.14Pros & Cons of the Cloud
1.3.15Exam-Style Questions - Networking Models
1.3.16Topology
1.3.17WiFi
1.3.18WiFi Encryption
1.3.19IP Addresses
1.3.20MAC Addresses
1.3.21Network Protocols
1.3.22Application Protocols
1.3.23Layers
1.3.24Advantages of Layering
1.3.25Exam-Style Questions - Network Protocols
1.4Network Security
1.5Systems Software
1.6Ethical, Legal, Cultural & Environmental Concern
1.6.1Open Source vs Proprietary Software
1.6.2Licensing Issues
1.6.3Ethical Issues
1.6.4Ethical Issues 2
1.6.5Exam-Style Questions - Ethical Issues
1.6.6Legal Issues
1.6.7Legal Issues 2
1.6.8Freedom of Information Act (2000)
1.6.9Cultural Issues
1.6.10Environmental Issues
1.6.11Positive Environmental Impact
1.6.12Privacy Issues
1.6.13Stakeholders
1.6.14End of Topic Test - Software & Issues
2Computational Thinking, Algorithms and Programming
2.1Algorithms
2.1.1Computational Thinking
2.1.2Algorithmic Thinking
2.1.3Pseudocode & Flow Diagrams
2.1.4Interpreting & Correcting Algorithm
2.1.5Completing Algorithms
2.1.6Search Algorithms
2.1.7Binary Search
2.1.8Overview of Sort Algorithms
2.1.9Bubble Sort & Insertion Sort
2.1.10Merge Sort
2.1.11Exam-Style Questions - Sorting Algorithms
2.2Programming Fundamentals
2.3Producing Robust Programs
2.4Boolean Logic
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