ADVANCE
LEVEL
2
AGENDA
Introduction to Programming Language
Introduction to Python
Features of Python
How to work
Basics of Python
String and Variable
Control Statements
INTRODUCTION
TO PYTHON
Python is a high-level, interpreted programming
language.
It is used for web development, data science, AI,
automation, etc.
Easy to read, beginner-friendly.
5
✨ Features of Python
•Simple and Easy to Learn
•Open-source and Free
•Supports Object-Oriented
Programming (OOP)
•Huge Libraries Available
🌟 Why Learn Python?
•Beginner Friendly
•Widely Used in Industry
•Helps to build Games, Websites, Apps,
AI tools
6
HOW TO USE PYTHON
1. Interactive Mode (Direct
Typing)
•Open Python Shell (IDLE).
•Type commands one by one and get
instant output.
7
2. Script Mode (Writing Programs)
•Create a .py file (example: [Link]).
•Write multiple lines of code and save it.
•Then run the file to see all outputs at
once.
8
DIFFERENCE BETWEEN INTERACTIVE
MODE AND SCRIPT MODE
Feature Interactive Mode Script Mode
Type code line-by-line and Write code in a file and run
What it is
get results immediately all at once
In Python shell or IDLE (like In a text editor (like VS
Where to use
chatting) Code)
For testing small pieces of
When to use For projects and longer code
code quickly
Type: print("Hello") and see Write in a file and run:
Example
result instantly python [Link]
Writing, saving, and running
Good for Learning, trying simple stuff
full programs
Saves and runs the whole
Why it's better Quick feedback for learning
program
9
What are variables?
•Variables are like containers that store values in your program. You can change
the value of the variable any time.
Rules for Variables in Python:
•No spaces in variable names.
•Cannot start with numbers.
•Shouldn’t use Python reserved words (like if, else, print).
What is a string? 10
•A string is a sequence of characters enclosed in quotes (single or double).
Concatenating Strings
•You can join strings together using the + operator.
String Repetition
•You can repeat strings using the * operator
MY CALCULATOR PROGRAM
• String:- Group of letters, special characters like(:)and
spacing also so we should give inside quotes using print
statement.
11
• a,b,x,y,c,d,e,f,sum,dub,multiply,division:- Variable
• Concatentaion:- string+Variable (so for that we use comma
12
GETTING INPUT FROM THE USER IN
PYTHON
1. Using the input() Function:
What is it?
•The input() function in Python allows you to take input from the user through the
keyboard.
How it works:
•When the program reaches input(), it waits for the user to type something and press
Enter.
•The input is then returned as a string (even if the user enters numbers).
13
2. Converting User Input:
•By default, the value returned by input() is always a string.
•If you need an integer or float, you can convert it using functions like int() or
float().
My Marksheet Program
In user input method we should give
variable name correctly and have to close
the brackets correctly else will get a error.
14
DATA TYPES
Data Type Example Description
int 10 Whole number
float 3.14 Decimal number
Text or string of
str "Hello"
characters
bool True True or False value
15
My Personal Detail Program
is_student=is_student.lower()==“
yes”
• If we give yes means in output it
will print true if not it will print
false.
• is_student(Boolean)
• lower().it will come in lowercase
16
17
CONTROL STATEMENT IN PYTHON
Control statements are used to control the flow of execution based on
certain conditions.
The main control statements in Python are:
[Link] – Executes a block of code if a condition is True.
[Link] – Executes a block of code if the if condition is False.
[Link] – Stands for "else if", used to check multiple conditions after an if.
18
1. if Statement
The if statement checks if a condition is True and executes the associated block
of code.
19
2. else Statement
The else statement is used to execute a block of code if the if condition
is False.
20
3. elif Statement:
The elif (else if) statement checks multiple conditions.
If the if condition is False, it checks the elif condition. If elif is also False, it moves to else.
21
THANK YOU