Computer Science for AS/A2
Python was developed by Guido van Rossum
Python is Interpreted
Python is Interactive
Python is Object-Oriented
Open a Web browser and go to
https://www.python.org
Follow the link for the Windows installer
python-XYZ.msi file where XYZ is the version
you need to install.
Run the downloaded file
Go to the command prompt :
Type “cmd” in the run dialog box.
type set path %path%;C:\Python
A Python identifier is a name used to identify
a variable, function, class, module or other
object. An identifier starts with a letter A to Z
or a to z or an underscore (_) followed by
zero or more letters, underscores and digits
(0 to 9).
Names are case sensitive and cannot start
with a number. They can contain letters,
numbers, and underscores.
bob Bob _bob _2_bob_ bob_2 BoB
Keyword cannot be identifier name.
Class names start with an uppercase letter. All
other identifiers start with a lowercase letter.
Starting an identifier with a single leading
underscore indicates that the identifier is
private. ( e.g : _google)
Starting an identifier with two leading
underscores indicates a strongly private
identifier. ( e.g : __google)
If the identifier also ends with two trailing
underscores, the identifier is a language-
defined special name. (e.g : __init__ )
Built in data
types
Primitive Referential Objective
•INT •LIST STRING
•FLOAT/REAL •TUPLE
•LONG •DICTIONARY
•COMPLEX
•BOOLEAN
o Arithmetic Operators
o Comparison (Relational) Operators
o Assignment Operators
o Logical Operators
o Bitwise Operators
o Membership Operators
o Identity Operators
X << Y
o
X >>Y
o
Sequence
Selection
Iteration