Chapter 1
Chapter 1
Introduction of Python
Python is an interpreter, interactive, object-oriented, and high-level programming
language. It was created by Guido van Rossum in 1991 at National Research Institute
for Mathematics and Computer Science Netherlands.
Click to join telegram channel: Computer by Govind rathore
https://t.me/computer_by_govind_rathore
Python IDLE
The python IDLE tool offers an interactive and a more efficient platform to write your
code in python.
Python Modes
● Interactive Mode
● Script Mode
Different types of files in python:
.py, .pyc, .pyd, .pyo, .pyw, .pyz
Variable:
A Variable is like a container that stores any value.
x=3, age=30
Rules for valid Variable name:
Multiple Assignments:
Components of Variable/Object:
A). Identity of the Variable / Object: It refers to the Variable’s memory location address which is unchanged once it has
been created. We can check memory location using this method:
id()
B). Type of the Variable / Object (data type):
int float Complex str boolean None
5 5.5 2+5j “hello” True/False None
We can seen any data type by: type()
y=”Hello”
type(y)
C). Value of the Variable/Object:
The value stored in Variable like: age=20, so 20 is the value of the variable.
L-value is age, and R-Value is 20
Data Types:
What is Dynamic Typing:
It refers to declaring a variable multiple times with values of different data types. And variable automatically changes
its data types according to data.
a=10
a=”Hello”