0% found this document useful (0 votes)
3 views11 pages

Python Complete Course

This document outlines a comprehensive Python course designed for beginners to advanced learners, featuring modules on Python basics, variables, operators, input/output, decision making, loops, lists, dictionaries, functions, string manipulation, error handling, classes, file handling, and libraries. Each module includes explanations in easy language and Hinglish, along with practical examples and exercises. The course emphasizes consistent practice, project creation, debugging skills, and real-world applications to enhance learning.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views11 pages

Python Complete Course

This document outlines a comprehensive Python course designed for beginners to advanced learners, featuring modules on Python basics, variables, operators, input/output, decision making, loops, lists, dictionaries, functions, string manipulation, error handling, classes, file handling, and libraries. Each module includes explanations in easy language and Hinglish, along with practical examples and exercises. The course emphasizes consistent practice, project creation, debugging skills, and real-world applications to enhance learning.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

■ Complete Python Course

Beginner to Advanced

Easy Language + Hinglish Explanation

Module 1: Python Basics ■■ Print Statement


Kya hai Python?
Python ek programming language hai jo bilkul aasan hai. Isse aap apne computer ko order de sakte ho kuch
kaam karne ke liye. Python ka code padna bilkul English padne jaisa hai.

Print Statement - Kuch likhna


Jab aap `print()` likhte ho, to jishu cheez uske andar likhi hoti hai, wo screen par aata hai. Bilkul ek megaphone
hai jo sab ko sunata hai.

Example:
print("Hello, Duniya!")
print("Mera naam Rahul hai")
print(123)

Output:
Hello, Duniya!
Mera naam Rahul hai
123

Module 2: Variables ■■ Data Types


Variable kya hota hai?
Variable ek box hai jisme aap kuch data store kar sakte ho. Jaise aapke room mein almaari hoti hai - usme aap
kapde rakho, books rakho, kuch bhi rakh sakte ho.

Simple Examples:
naam = "Raj"
umar = 18
height = 5.8
hai_student = True

Main Data Types:


1. String - Text (shabd): "Raj"
2. Integer - Puri sankhya: 18
3. Float - Decimal number: 5.8
4. Boolean - Sach ya Jhooth: True/False
Module 3: Operators - Ganit ke Niyam
Arithmetic Operators:
a = 10
b=3
a + b = 13 (Jod)
a - b = 7 (Ghataao)
a * b = 30 (Guna)
a / b = 3.33 (Bhag)

Comparison Operators:
x == y (Kya equal hain?)
x != y (Kya alag hain?)
x < y (Chhota hai?)
x > y (Bada hai?)

Logical Operators:
True and True = True
True or False = True
not False = True
Module 4: Input - Keyboard Se Data Lena
input() function - User se kuch puchna:
naam = input("Aapka naam kya hai? ")
print("Namaste, " + naam)

Magic Formula - int() aur float():


Input humesha text hota hai. Agar number chahiye to int() ya float() use karo.

umar = input("Aapki umar kya hai? ")


umar = int(umar)
print("Aapki umar ek saal baad hogi: " + str(umar + 1))

Module 5: If-Else - Faisla Lena (Decision Making)


Agar...to...nahi to: Faisla kaise lain

Example 1:
umar = 18
if umar >= 18:
print("Aap adult ho, vote kar sakte ho")
else:
print("Aap abhi chhota hai")

Example 2 - Multiple Conditions (elif):


marks = 85
if marks >= 90:
print("A - Excellent!")
elif marks >= 80:
print("B - Good!")
elif marks >= 70:
print("C - Pass")
else:
print("F - Fail")

Module 6: Loops - Ek Kaam Bar-Bar Karna


For Loop - Ginti ke saath kaam karna:
for i in range(5):
print(i)
# Output: 0, 1, 2, 3, 4

Practical Example - 7 ka table:


for i in range(1, 11):
print(f"7 × {i} = {7 * i}")
While Loop - Jab Tak Condition Sach Ho:
count = 1
while count <= 5:
print(f"Count: {count}")
count = count + 1
Module 7: Lists - Ek Jaise Kuch Cheezein Rakho
List kya hota hai?
Ek bada dabba jisme kai cheezein ho sakti hain.

Examples:
fruits = ["Apple", "Banana", "Mango", "Orange"]
print(fruits[0]) # Pehla = Apple
print(len(fruits)) # Kitni hain = 4

List operations:
[Link]("Mango") # Aakhir mein add
[Link]("Banana") # Banana nikalo
[Link]() # Aakhri nikalo

Loop ke saath:
for fruit in fruits:
print(fruit)

Module 8: Dictionaries - Dono Ka Rishta (Key-Value)


Dictionary - Like phone book:
person = {
"naam": "Raj",
"umar": 18,
"city": "Delhi"
}

Access karna:
print(person["naam"]) # Raj
print(person["umar"]) # 18

Dictionary Mein Badlav:


person["umar"] = 18 # Change
person["height"] = 5.8 # Naya add

Loop ke saath:
for key in person:
print(f"{key}: {person[key]}")

Module 9: Functions - Apna Kaam Likho Ek Baar


Function Kya Hota Hai?
Ek niyam/formula jo aap bar-bar use kar sakte ho.
Simple Function:
def namaste_kehna():
print("Namaste! Sab theek ho?")
namaste_kehna()

Function with Input:


def greet(naam):
print(f"Shukriya {naam}!")
greet("Raj")

Function with Return:


def add(a, b):
result = a + b
return result
answer = add(5, 3)
print(answer) # 8
Module 10: String Manipulation - Text Se Khelna
Strings ke special Powers:
text = "Hello World"
print(len(text)) # 11
print([Link]()) # hello world
print([Link]()) # HELLO WORLD
print([Link]("World", "Python")) # Hello Python

String Slicing:
word = "Python"
print(word[0]) # P (pehla)
print(word[1:4]) # yth
print(word[:3]) # Pyt
print(word[3:]) # hon

F-strings (Formatted Strings):


naam = "Raj"
umar = 18
print(f"{naam} ki umar {umar} saal hai")

Module 11: Try-Except - Galti Ko Pakdna


Problem:
Agar galti ho to program ruk jaata hai.

Solution:
try:
umar = int(input("Umar likho: "))
print(umar + 5)
except ValueError:
print("Number likho, text nahi!")
except:
print("Koi aur problem hai")

Ye tarika aapke program ko safe rakhta hai.

Module 12: Classes aur Objects - OOP


Class kya hota hai?
Blueprint like. Jaise mold se sab cookies same hoti hain.

Simple Class:
class Student:
def __init__(self, naam, marks):
[Link] = naam
[Link] = marks
def result(self):
if [Link] >= 40:
return f"{[Link]} pass hua!"

Object banao:
student1 = Student("Raj", 85)
print([Link]()) # Raj pass hua!
Module 13: File Handling - File Se Data Likho Aur Padho
File Likho:
file = open("[Link]", "w")
[Link]("Aaj bahut accha din tha!")
[Link]()

File Padho:
file = open("[Link]", "r")
content = [Link]()
print(content)
[Link]()

Modern Tarika (Recommended):


with open("[Link]", "w") as file:
[Link]("Python seekh raha hoon")

Read:
with open("[Link]", "r") as file:
content = [Link]()
print(content)

Module 14: Libraries aur Imports


Python mein pehle se bhot kuch likha hota hai, bas use karna padta hai.

Math Library:
import math
print([Link](16)) # 4.0
print([Link]) # 3.14

Random Library:
import random
print([Link](1, 100)) # Random number
print([Link]([1, 2, 3])) # Random choice

DateTime Library:
from datetime import datetime
aaj = [Link]()
print([Link])
print([Link])
Summary - Kya Sikha
■ Variables aur Data Types

■ Operators aur Comparisons

■ Input lena aur Output dena

■ If-Else Decision Making

■ Loops (For aur While)

■ Lists aur Dictionaries

■ Functions likho aur use karo

■ Strings handle karna

■ Files padho aur likho

■ Error handling

■ Classes aur Objects

■ Libraries use karna

■ Advanced concepts

Next Steps

1. Har din code likho - Coding aadat ho jayegi

2. Projects banaao - Book padh-padh hi theek nahi hota

3. Debugging seekho - Galti khud se theek karna seekho

4. Real Duniya Projects - Web scraping, Game, Chatbot

5. GitHub par rakho - Portfolio banaio


Happy Coding! ■■
Python seekhna easy hai, bas consistent rehna padta hai!

You might also like