🟢 Beginner · Lesson 02
Python Setup: Windows, VS Code और IDLE
Python Installation और Setup
Python programs लिखने से पहले computer में Python सही तरीके से install होना चाहिए। Setup का मतलब है Python install करना, version check करना, PATH set करना, editor choose करना और first .py file run करना।
Installation Steps
| Step | Action |
|---|---|
| 1 | Python 3 download करें। |
| 2 | Installation के time Add Python to PATH tick करें। |
| 3 | Command Prompt/Terminal में python --version check करें। |
| 4 | pip --version से package manager check करें। |
| 5 | VS Code और Python extension install करें। |
Important Commands
Terminal Commands
python --version pip --version python hello.py
hello.py बनाकर Run करें
hello.py
print("Hello from Python")Hello from Python
Common Setup Problems
python is not recognized: PATH सही set नहीं है।pip is not recognized: pip/PATH issue है।- File
hello.py.txtबन गई: इसे.pyextension से save करें। - Wrong folder में command run करना: पहले
cd foldernameuse करें।
सारांश
Correct setup में Python 3, pip, working terminal command और VS Code जैसा editor होना चाहिए। hello.py run हो जाए तो Python learning start कर सकते हैं।
💻 लाइव कोड एडिटर
इस पेज के प्रोग्राम यहीं तैयार हैं — चलाएँ, बदलें और सीखें। कुछ भी इंस्टॉल किए बिना।
OneCompiler द्वारा संचालित। कोड एडिटर में अपने आप आ जाता है — Run दबाकर आउटपुट देखें। अगर एडिटर न खुले तो नए टैब में खोलें.