Getting started with python in hindi

Python Install Kaise Karen?

Python install karna ke pahle aap cmd.exe (for Window PC) file ko run karen aur check karen ki python apke system me pahle se available hai ya nhi…

Check Karne ke liye type karen…

C:\Users\pc Name>python –version

Agar aap Linux/Mac System use karte hain to Terminal me type karen…

python –version                            …use double dash

Agar aap ko python se related information nhi milti hai to aap Python ki official site https://www.python.org/ par jakar isse download kar lijiye…

Python Download aur install karne ke baad ise Environment variable me jarur set kar le… Aur agar aap Environment variable set karna nhi jante to click karen 

 

Python ko samjhe

Python ek Interpreted Programming Language hai, jisme user directly editor par coding karke usko interpreter ke through directly execute karta hai. Yaad rakhiye ki python me ki gai coding ko hamesha .py extension ke sath save karna hota hai…

Niche diya gaya example kisi bhi Python file ko create karne ya fir open karne ka hai :

C:\Users\pc Name>python hello.py

Jaise hi aap upar diye code ko execute karenge waise hi hello.py file open ho jayegi aur waha aap apni coding bhi kar payenge.

I hope, aapne file create kar liya hoga aur use open bhi kar liya hoga. Ab usme a single line of code likhiye

print(“Hello”)

Ab ise save kar lijiye aur Run menu me jakar Run Module par click kariye…

O/P : Hello 

 

Python ki Command Line

Jab aap python install karte hain tab python by default 1 IDLE naam ka editor provide karta hai jisme kisi bhi single line of code ko execute kar sakte hain. 

Isi tarah aap directly cmd prompt ka use karke bhi line by line code likhkar execute kar sakte hain…

Hum yaha par IDLE Editor ka use karenge. IDLE ko open karne ke liye aap desktop me jakar search section par direct “idle” type karen. Search karte hi aapko waha easily mil bhi jayega.

Ab open hote hi type karen :

>>> print(“Hello”)                                                … Hit Enter
Hello                                                                     
… Output