Learn Python in Hindi: अपना पहला Python Program बनाना सीखें | Python Tutorial Part 1
Python Programming Tutorial for Beginners
Python क्या है? अपना पहला Python Program कैसे बनाएं?
अगर आपने कभी Programming नहीं सीखी है, तो चिंता करने की जरूरत नहीं है। इस पूरी series में हम Python को बिल्कुल शुरुआत से step-by-step सीखेंगे। आज हम Python का परिचय जानेंगे और अपना पहला Python Program बनाएंगे।
🐍 Python क्या है?
Python एक popular, high-level और general-purpose programming language है। इसकी syntax सरल और readable होने के कारण beginners के लिए programming शुरू करने के लिए Python एक अच्छा विकल्प है।
⭐ Python Beginners के लिए क्यों अच्छी है?
- इसकी syntax relatively आसान और readable है।
- Programming सीखने की शुरुआत करने के लिए उपयोगी है।
- AI, Data Science और Web Development जैसे क्षेत्रों में इस्तेमाल होती है।
- Python की बड़ी community और बहुत सारी libraries हैं।
- इसमें छोटे programs से शुरुआत करके धीरे-धीरे advanced programming सीखी जा सकती है।
💻 Python Programming शुरू करने के लिए क्या चाहिए?
Python सीखने के लिए आपको एक computer या laptop और Python चलाने के लिए Python interpreter अथवा किसी compatible coding environment की जरूरत होगी।
📥 Python Install होने के बाद कैसे Check करें?
अगर आपके computer में Python installed है, तो Command Prompt या Terminal खोलकर नीचे दी गई command चला सकते हैं:
python --version
अगर Python सही तरीके से installed है, तो आपको Python का installed version दिखाई देगा।
🚀 अब बनाते हैं अपना पहला Python Program
Programming सीखते समय शुरुआत में अक्सर एक simple message screen पर दिखाया जाता है। इसके लिए Python में print() function का इस्तेमाल किया जाता है।
print("Hello World")
Hello World
🔍 print() को समझिए
ऊपर हमने लिखा:
print("Hello World")
यहाँ print() एक built-in function है। इसका उपयोग output को screen पर दिखाने के लिए किया जाता है।
"Hello World" एक string है। आसान भाषा में कहें तो यह text है जिसे हम screen पर दिखाना चाहते हैं।
✏️ अपना नाम Screen पर Print करें
अब Hello World की जगह अपना नाम लिखकर program चलाइए।
print("My name is Govind")
My name is Govind
📝 Python में Text Print करने के Examples
print("Namaste")
print("Welcome to Python")
print("I am learning Python")
print("Python is easy to learn")
Namaste
Welcome to Python
I am learning Python
Python is easy to learn
💬 Python में Comments क्या होते हैं?
Program में explanation या notes लिखने के लिए हम comments का इस्तेमाल कर सकते हैं। Python में single-line comment के लिए # symbol लगाया जाता है।
# This is my first Python program
print("Hello World")
Python # के बाद लिखे गए comment को execute नहीं करता।
🔢 क्या print() से Number भी दिखा सकते हैं?
हाँ। Python में हम numbers को भी print कर सकते हैं।
print(100)
print(25)
print(10 + 5)
100
25
15
ध्यान दें कि 10 + 5 को Python ने calculate करके 15 output किया।
आगे हम Operators को विस्तार से सीखेंगे।
🎯 Multiple Values एक साथ Print करें
आप एक ही print() function में कई values भी लिख सकते हैं।
print("My age is", 15)
My age is 15
🪜 अपना पहला Program बनाने के Steps
- अपने computer में Python या Python-compatible editor खोलें।
- एक नई Python file बनाएँ।
print("Hello World")लिखें।- File को .py extension के साथ save करें।
- Program को Run करें।
- Screen पर Hello World दिखाई देगा।
🧪 अब आपकी Practice
🎓 Challenge: खुद Program बनाइए
अब बिना ऊपर देखकर इन programs को खुद लिखने की कोशिश करें:
- अपना नाम print करें।
- अपने शहर का नाम print करें।
- I Love Python print करें।
- एक ही program में तीन अलग-अलग messages print करें।
- अपनी पसंद का कोई number print करें।
🔥 Beginner Challenge: एक ऐसा program लिखिए जिसमें आपका नाम, शहर और Python सीखने का message तीन अलग-अलग lines में दिखाई दे।
🧠 Quick Quiz
Q1. Python में output दिखाने के लिए किस function का इस्तेमाल किया जाता है?
A) output()
B) display()
C) print()
D) show()
Q2. इनमें से सही Python statement कौन-सा है?
A) print Hello
B) print("Hello")
C) Print Hello
D) output("Hello")
📚 आज आपने क्या सीखा?
❓ Frequently Asked Questions
क्या Python beginners के लिए आसान है?
हाँ। Python की syntax relatively simple और readable है, इसलिए beginners programming सीखने की शुरुआत Python से कर सकते हैं।
Python का पहला program कौन-सा है?
Programming की शुरुआत में आमतौर पर print("Hello World")
जैसे simple program से की जाती है।
Python में print() का क्या काम है?
print() का उपयोग output को screen पर दिखाने के लिए किया जाता है।
क्या Python सीखने के लिए पहले से programming आना जरूरी है?
नहीं। आप Python को बिल्कुल beginner level से सीखना शुरू कर सकते हैं।
Python का इस्तेमाल कहाँ किया जाता है?
Python का इस्तेमाल Web Development, Artificial Intelligence, Machine Learning, Data Science, Automation और कई अन्य क्षेत्रों में होता है।
🚀 Next Lesson
अब आपने Python में अपना पहला program बना लिया है। अगली पोस्ट में हम Python के एक बहुत जरूरी concept को सीखेंगे:
Python Variables क्या हैं?
हम सीखेंगे कि data को Python में store कैसे किया जाता है और variables कैसे बनाए जाते हैं।
👉 Part 2 पढ़ें
टिप्पणियाँ
एक टिप्पणी भेजें