Chapter 1 - Introduction to Python
By Ankit Sir • DevTeam
Chapter 1
Introduction to Python
Python is a simple and easy-to-understand programming language.
It feels like reading simple English.
Its pseudo-code nature makes it beginner friendly.
Why Python?
Features of Python
- Easy to understand → Less development time
- Free and Open Source
- High-level programming language
- Portable (Windows, Linux, Mac)
- Fun and flexible to work with
Basics
What is Programming?
Programming is a way to communicate with the computer.
Just like humans use Hindi or English,
computers use programming languages like Python.
First Program
Hello World Program
Create a file named hello.py and write:
print("Hello World")
print() is a built-in function
- Used to display output
- Run using python hello.py
Practice
Practice – 1
- 25 + 37
- 100 / 7 and 100 % 7
- 2 ** 10
- x = 50 → x * 2
- "Hello" + " Python"
- "Hi " * 5
- type(3.14)
- [1,2,3,4][2]
- {"name":"Ankit","age":22}["name"]
- (10 > 3), (5 < 2)