Computer Science GCES EDEXCEL
-
Decomposition And Abstraction Edexcel2 主题
-
Algorithms Edexcel11 主题
-
Follow And Write Algorithms Edexcel
-
Introduction To Programming Concepts Edexcel
-
Basic Programming Concepts Edexcel
-
Variables Constants And Assignments Edexcel
-
Data Structures And Arrays Edexcel
-
Arithmetic Relational And Logical Operations Edexcel
-
Determine Outputs Of An Algorithm Edexcel
-
Types Of Errors Edexcel
-
Standard Sorting Algorithms Edexcel
-
Standard Searching Algorithms Edexcel
-
Algorithm Efficiency Edexcel
-
Follow And Write Algorithms Edexcel
-
Truth Tables Edexcel3 主题
-
Binary Edexcel6 主题
-
Data Representation Edexcel4 主题
-
Data Storage And Compression Edexcel2 主题
-
Hardware Edexcel5 主题
-
Software Edexcel3 主题
-
Programming Languages Edexcel2 主题
-
Networks Edexcel7 主题
-
Network Security Edexcel2 主题
-
Environmental Issues Edexcel1 主题
-
Ethical And Legal Issues Edexcel3 主题
-
Cybersecurity Edexcel2 主题
-
Develop Code Edexcel6 主题
-
Constructs Edexcel4 主题
-
Data Types And Data Structures Edexcel5 主题
-
Operators Edexcel1 主题
-
Subprograms Edexcel2 主题
Fundamental Components Of Programs Edexcel
Exam code:1CP2
Constants, Variables, Initialisation & Assignment
Constants
-
A constant is an identifier set once in the lifetime of a program
-
Constants are named in all uppercase characters
-
Constants aid the readability and maintainability
-
If a constant needs to be changed, it should only need to be altered in one place in the whole program
|
Python examples |
|---|
|
|
|
|
|
|
Variables
-
A variable is an identifier that can change in the lifetime of a program
-
Variables are named in lowercase characters unless combining multiple words
-
A variable can be associated a datatype when it is declared
-
When a variable is declared, memory is allocated based on the data type indicated
|
Python examples |
|---|
|
|
|
|
|
|
Initialisation & assignment
-
A variable can be initialised with a value
-
The assignment operator
=is used to set or change the value of a variable
|
Python examples |
|---|
|
|
|
|
|
|
Inputs & Outputs
Inputs
-
The
input()function is used to capture an input from the user -
All inputs default to strings and may need converting to the required data type in the program
|
Python examples |
|---|
|
|
|
|
|
|
Outputs
-
The
print()function is used to output to the screen
|
Python examples |
|---|
|
|
|
|
|
|
-
An output can be formatted to the users needs using string formatting
{}
|
Python examples |
|---|
|
|
|
|
Responses