Week - 1: Brief History of Python
Week - 1: Brief History of Python
Week - 1: Brief History of Python
WEEK -1
Python is a general purpose, high level programming language.
Brief history of Python was developed by Guido Van Rossam in 1989 while working at
python National Research Institute at Netherlands.
But officially Python was made available to public in 1991. The official
Date of Birth for Python is : Feb 20th 1991.
Python is recommended as first programming language for beginners.
• Simple and easy Python is a simple programming language.
Features to learn When we read Python program, we can feel like
reading English statements.
• Extensive library Python has a rich inbuilt library
• Portable Python can run on a wide variety of hardware
platforms and has the same interface on all
platforms
• Extendable Enable programmers to add to or customize their
tools to be more efficient.
• Databases Python provides interfaces to all major
commercial databases
• GUI Programming Python supports GUI applications that can be
created and ported.
• Freeware and Open We can use Python software without any license
Source and it is freeware.
• Platform Once we write a Python program, it can run on
Independent any platform without rewriting once again
• Interpreted We are not required to compile Python programs
explicitly. Internally Python interpreter will take
care that compilation
1. For developing Desktop Applications
Applications 2. For developing web Applications
3. For developing database Applications
4.For Network Programming
5. For developing games
6. For Data Analysis Applications
7. For Machine Learning
8. For developing Artificial Intelligence Applications
9. For IOT
Spyder
PyDev
Idle
Wing
Best practices for • Proper Documentation and Commenting and Proper Indentation
python • Proper Naming of Variables, Classes, Functions and Modules
programming • Writing Modular Code
• Use inbuilt functions
• Exception handling
• Avoid Creating Global Variables
Character set • Character set is a valid set of • Alphabets: All capital (A-Z) and small
characters recognized by the (a-z) alphabets.
Python language. • Digits: All digits 0-9.
• These are the characters we • Special Symbols: Python supports all
can use during writing a kind of special symbols like, ” „ l ; : ! ~
Python programs. @#$%^`&*()_+–={}[]\.
• White Spaces: White spaces like tab
space, blank space, newline, and
carriage return.
Tokens A token is the smallest individual Ex: a=20+30 is an instruction. Here a ,
unit in a python program. Tokens = , 20, + and 30 are the tokens
are used to construct an instruction
in a Python program
Keywords • These are the words that are already Ex: True, None, False, if, else, while
reserved for some particular purposes. etc…
• They are also called as reserved words.
• Keywords cannot be used as identifiers.
• >>> keyword.kwlist
Literals • Literals refer to the values stored in a Ex: a=20 Here 20 is refered as literal
variable. (numeric)
• Ex: name=“Rossom” Here „Rossom‟
is refered as literal (string).
Operators • Operators are the symbols that perform a Ex: +, - , * , /, %, < ,>, =, !=, ==, >=, <=
specific operation on given values and etc
give a result. Ex: a=10+20 In this example, + is called
an operator and 10 and 20 are called
operands
Delimiters • Delimiters refer to the symbols that Ex: comma (,) semicolon ( ;) colon( :)
separate two text strings. period ( .) braces {} slash ( / \) etc
Variables • Variables are containers for storing data
values. Example: x = 5
• A variable is created the moment you y = "John"
first assign a value to it. print(x) >>> 5
print(y) >>> John
Naming • A variable can have a short name (like x and y) or a more descriptive name (age,
rules for carname, total_volume).
variables • A variable name must start with a letter or the underscore character
• A variable name cannot start with a digit
• A variable name can only contain alpha-numeric characters and underscores
(A-z, 0-9, and _ )
• Variable names are case-sensitive (age, Age and AGE are three different variables).