Python is simple and easy.
Free and open source.
High level language.
Developed by Guido van Rossum.
Portable.
o Ex.,
Print(“Hello World”)
Python Character Set
Letters – A to Z, a to z
Digits – 0 to 9
Special Symbols - +,-,*,/ etc.
Whitespaces – Blank space,tab,carriage
return,newline,formfed
Other characters – Python can process all ASCII and
Unicode characters as part of data or literals
o Ex.,
Print(“Sai is my name.”, “My age is 19.”)
Output : Sai is my name .
My age is 19.
o Ex.,
Print(20)
Output : 20
Variables
A variable is a name given to a memory location in a program.
, Name = “Sai”
Age = 20
Price = 25.99
o Ex.,
name = “Sai”
age = 20
price = 25.99
print(name)
Output : Sai
Rules for Identifiers
1. Identifiers can be combination of uppercase and lowercase
letters,digits or an underscore(_).
So myVariable, variable_1,variable_for_print all are valid
python identifiers.
2. An identifier can not start with digit . So while variable1 is
valid , 1variable is not valid.
3. We can’t use special symbols like !,#,@,%,$ etc in our
identifier.
4. Identifier can be of any length.
Data Types
Integer
String
Float
Boolean
None
o Ex.,
age = 20
old = True