Assignment, Variables, Constants & Sequences
Inputs, Outputs & Type Conversion
Condition controlled Loops
Count Controlled loops
Nested Selection and Iteration
Subroutines 1 - Procedures
Subroutines 2 - Functions
Operators and Operations
Structured Programming
Validation and verification
Good notes will help you organise and process data and information
A variable stores data that can change while a program is running.
A Constant stores data that cannot change while a program is running.
In Python We don't need to define a variable or constant before using it. We simply assign it a value and it will exist. We don't even have to declare the type of the variable. This is handled internally according to the type of value we assign to the variable
We use the assignment operator (=) to assign values to a variable. Any type of value can be assigned to any valid variable.
Click on the run button below to see the output of the python code assigning variables
See if you can improve the output of the code above?
A Constant is a value that cannot change while a program is running
When creating identifiers to identify a constant or a variable there are certain naming conventions we need to be aware of.
Here are naming conventions for Python identifiers −
Python does not allow punctuation characters such as @, $, and % within identifiers. Python is a case sensitive programming language. Thus, Manpower and manpower are two different identifiers in Python.
Lets look at the learning outcomes and decide which one best describes our current level of understanding :
Tick the one you feel is closest to your level
AQA Computer Science Tutor
Variables
Naming Variables
Local Variables