Python ka Syntax – Itna Simple, It Feels Like English #2 || Python Ka Pitara || DeathCode - DeathCode

Python ka Syntax – Itna Simple, It Feels Like English #2 || Python Ka Pitara || DeathCode

β€œTo bhai pichle part me humne dekha ki Python kya hai, kyun use karte hain, aur kaise duniya bhar me Python ka danka baj raha hai.

Ab baat karte hain Python ka actual chehra kaisa hota hai β€” uska syntax.

Ye wo rules hote hain jinke basis pe hum Python me code likhte hain.

Aur sach bolun, it’s literally like writing English sentences! Samajhne me easy, likhne me easy – aur padhne me bhi.”


πŸ§’ Section 1: Hello World & Syntax Basics

β€œChalo bhai bina time waste kiye apna pehla program likhte hain.”

πŸ’» Screen pe VS Code + Python file open karo

print("Hello, world!")

β€œBas itna. Aur run karo β€” output aa gaya: Hello, world!

Kya koi main() likhne ki zarurat? Nahi.

Semicolon lagana mandatory? Nahi.

Curly braces? Nope.

Bas ek print() function – jo ki built-in hai – aur string likh do. Ho gaya kaam.”


βš™οΈ Section 2: Python ke Syntax Rules

1. Indentation is King!

if 5 > 2:
    print("Five is greater than two!")

β€œPython me koi curly braces nahi hote blocks banane ke liye, jaise JS ya Java me hote hain.

Yahaan har block indentation se decide hota hai β€” yaani space ya tab se.

Indentation galat matlab program galat.”

2. Case Sensitive Language

name = "DeathCode"
Name = "NotSame"

β€œYahan name aur Name alag-alag variables hain – Python case-sensitive hai.

Isliye variable naming me dhyan dena padta hai.”

3. Comments – For Humans

# This is a single-line comment
 
"""
This is a
multi-line comment
"""

β€œComments likhna zaruri hai, future tumhare liye ya kisi aur ke liye.

Ek β€˜#’ laga ke likho ya triple quotes me multi-line likh do.”


🧠 Section 3: Variables & Naming Conventions

x = 10
name = "Python"

β€œPython me variable banane ke liye koi var ya let likhne ki zarurat nahi.

Bas naam likho, = lagao, aur value de do.”

β€œVariable ka naam meaningful ho, jaise score, userName, age – taaki samajhne me asaani ho.”

πŸ“Œ Visual Tip: Show naming conventions:

  • Snake_case βœ…
  • camelCase ❌ (for Python)
  • Special characters ❌

🎯 Section 4: Real Mini Project – Simple Calculator

num1 = int(input("Enter first number: "))
num2 = int(input("Enter second number: "))
sum = num1 + num2
print("Sum is:", sum)

β€œYeh lo bhai – Python ka ek mini calculator!

User se input lo, usko integer me convert karo, add karo – aur output de do.”

β€œIsse kya hua? Tumne seekha:

  • Input lena
  • Type conversion (str to int)
  • Variables
  • print() ka advanced use

Ye real world ka first step hota hai programming me.”


πŸš€ Section 5: What’s Next

β€œTo bhai aaj humne Python ka syntax samjha, variables ka use kiya, indentation ka importance dekha, aur ek mini calculator bhi bana diya.

Ab agle part me hum dekhenge Python ke data types – string, number, list, tuple, dictionary β€” aur har ek ka real use case.

Ye part important hoga, kyunki isi se aage poori Python ki depth khulti hai.

Agar video pasand aayi to like aur comment kar dena Youtube p jake β€” aur agar koi doubt hai to Youtube comment section m puch skte ho.

Milte hain next part me! πŸ”₯”

Β© 2024 DeathCode. All Rights Reserved.