Logic samjhana
Comment batata hai ke next line ka kaam kya hai.
Python Chapter 2
Comment woh chhoti note hoti hai jo coder apne liye likhta hai. Python ise padhta nahi, sirf insan padhta hai.
Syntax: # yeh comment hai
Comment batata hai ke next line ka kaam kya hai.
Temporary note likh kar ya line explain kar ke bug trace karna asaan hota hai.
Dusra banda code dekhe to foran samajh jaye ke flow kya hai.
Comment ho ya na ho, Python sirf asli code chalata hai.
Code
# naam display karna hai
print('Ali')Yeh lines chalti hain
Output
Ali
Ab check karo ke comment aur code ka farq samajh aaya ya nahi.
Python mein comment kis symbol se start hota hai?
Comment wali line ka kya hota hai?
Kaunsi line comment hai?
Comment chhoti si note hoti hai jo hume code samajhne me madad deti hai.
Comment batata hai ke next line ka kaam kya hai.
Temporary note likh kar ya line explain kar ke bug trace karna asaan hota hai.
Dusra banda code dekhe to foran samajh jaye ke flow kya hai.
# student ka total marks store karo
marks = 450
print(marks)Comment sirf samjhata hai, run sirf niche wali lines hoti hain.
price = 1200
# discount baad mein apply hogi
print(price)Aap comment mein apni yaad-dahani bhi likh saktay ho.
# yahan user se naam lena hai
name = input("Enter name: ")Comment se next developer ko intent samajh aata hai.
More Topics
Variable naming, assignment aur basic examples yahan se prepare karo.
int, float, string aur boolean ko examples ke sath yahan se samjho.
Arithmetic aur comparison operators ko exam style me yahan se cover karo.
Input aur print output ko visual practice ke sath yahan se samjho.
For loop, while loop aur board-style loop questions yahan se cover karo.
Functions, parameters aur return concept ko examples ke sath samjho.
Output, coding aur board-style practical questions yahan se practice karo.