Chapter 2 Variables And Datatypes
Variables --> A variable is the name given to a memory location in a program.
For example
a=30
b="Tarunika"
c=71.22
Variables = container to store s value
Keywords = Reserved words in python
Identifiers=class/function/Variable name
U can search in google reserved keywords in python
Scroll down click on https://docs.python.org karke milega usper click kr lijiye....
Isme aapko testing for python keywords mil jayenge...
Variables nhi bna sakte ye mind krna...jankari ke liye btaya hai aage kaam aayega....
Datatypes--->
Primarily there are following data type in python
1- interers(1 2 3 4 -1 -2 -3 -4 etc)
2-Floating point numbers(8.2,7.9,4.5,6.3etc)
3-string(collection of characters double code single code triple code etc)
Jab b double code enclude karoge tab nyi line add nhi kar paoge..
And jab triple code me include kr rha hu tb aaram se aap nyi line b include kar sakte ho..
For example
a='''tarunika
is
a
good
girl'''
Then you run...
Tab tarunika is a good girl likh kar aa jayega...
Ye triple code ka example diya hai
4-Booleans(iska matlb ye hai sach ya jhut...ya to true hoga ya fir false hoga)
For example
a=True
print(a)
Then run to ye true run ho jayega
Isi ko agar false kr de to to false run ho jayega...
5-None(python programming language k andar ye btana hota hai ki kuch nhi....agar maan lo true false none in teeno me koi ek chiz lena chahta hu sach h na jhut h na verified hai etc maan lo...none kahi b use kar sakte)
For example
Kuch nhi = none(bna diya gya hai jo show krta h kuch nhi ko)
a=none
And run to none hi show hoga...
Now next
Python is a fantastic language that automatically identifies the type of data for us.
a=71 => identifies a as class
b=88.55=>identifies b as class
name="tarunika"=>identifies name as class
Rules for defining a Variable name-> also applies to other identifies
●A Variables name can contain alphabet,digit and underscores
● A Variables name can only start with an alphabet and underscore.
●A Variables name cant start with a digit.
●No while space is allowed to be used inside a Variable name.
Kal milte hai ab....aaj koi program run karke nhi dikhaya hai...to uska pura format uper likh diya hai....aap vs code me run krke dekh lena.(red na ho bas)...jaruri nhi jo maine likha wohi run karo...uske jaisa aap bna kr run sakte ho....
Jaise tarunika decimal number etc...
Good night ab monday ko milte hai...
apna dhyaan rakhna...
Phython learning program from beginners in hindi
Ksh*tij Education center provided a free programming tutorials / educational site containing over video & text based tutorials for Python programming.
This page is for all beginners who have passion to learn python.
Today topic is--->
Using Python as a calculator
We can use python as a calculator by typing "python + on the terminal...(this open REPL Or Read Evaluate Print loop)
Aap apne terminal me aaiye...( open window power shell)
Python type kariye uske baad
Aapka yahan repl install ho jayega...
6*8 type kiya isko read kiya uski value ko bta dega see video..
To Repl ka kya use hai aapne terminal khola python likha do chaar line execute krni hai krke dekh liya bas itna hi repl ka kaam hai....
exit()
Press enter aap repl se bahar aa jaoge....
COMMENTS------>
Comments are used to write something which the programmer does not want to execute. ...( can be used to mark author name date etc)
Doosri bhasha me kahe aapko likhna to hai per execute karna nhi chahte...
# is symbol k baad likhe huye ko read nhi karega..
Type of comments
There are two types of comments in python
1- Single line comments--> written using #
2- Multi line comments ---> written using ''' comments '''
See video
Akhir pahla chapter aaj close hua...
Practice set questions :
Q-1 write a program to print jhoney jhoney yes papa poem in python ?
Q-2 use REPL and print the table of 7 using it?
Q-3 install an external module and use it to perform an operation of your interest?
Q-4 write a python program to print the contents of a directory using os module. Search online for the function which does that?
Q-5 label the program written in problem 4 with comments?
Sorry for video.....
🕉Har Har Mahadev 🕉
Chapter-1
Modules,comments and pip
Lets write our very fast python program create a file called hello.py and paste the below code in it...
print ("hello world") --> print is a function
Execute this file (.py file) by typing python hello.py and you will see hello world printed on the screen
Jaisa ki kal aapko video se samjhaya tha....
File ka naam abc na rakhe..
Ab baat krte hai Modules ke baare me...
MODULES--> A modules is a file containing code written by somebody else (usually) which can be imported and used in our programs
Ya doosri bhasha me kahe ki mai internet se file ko download kar ke computer per install sakta hu....kisi aur ke dwara likha gya program mai apne program me use kar sakta hu.
Jaise import os built Modules hai isko install krne nhi padegi....
But import flask likh kr aap ise run karoge to module not found dikhega...kyuki install nhi hai..
Agar aap import tensorflow type krke run karoge to b ye module not found btayega....ye b install nhi hai...
Example
Type import flask then run
Uske baad terminal me dekhiye aisa kuch show hoga...
modulenotFoundError: no module named 'flask'
Ye isiliye hua kyuki ye download kiya nhi hai aur use karne k liye lag gye...apne computer me flask install kr sakte by writing(terminal me type kre jaha curser hai) pip install flask and press enter
Ab aapke computer me flask install ho jayega
PIP---> PIP is the package manager for python, you can use pip to install a module on your screen
Jaisa ki uper apko pip ki help flask install karwaya tha...
TYPE OF MODULES
There are two types of modules in python
1-Built in modules ---> pre installed in python(python ke saath hi mil jaate h)
2-External modules---> need to install using pip (jaise flask ko install kiya jata h)
Some examples of built in module are os,abc etc
Some examples of external modules are tensorflow, flask etc
Open Google and type built in modules in python
First page per click krke dekhiye python module index naam ka page khula
Next day topic --- how to use python as a calculator?
🕉Har Har Mahadeva🕉
WELCOME TO
CHAPTER -1
MODULES , COMMENTS & PIP
Pahla python kaise bnaaye...
Step 1- type here to search me ja kar visual studio code open kr le
Short cut btata hu agar aapne installation acche se kiya hoga to computer ki screen me right click kroge to "open with code" ka option aayega with vs code ke icon ke saath us per click kr le...
Niche pic me dekhiye kuch aisa interface aayega open krne k baad
Open folder
01_hello.py
Kuch b naam rakh sakte ho...
Ab python file ban chuki hai...
Now click in extensions and write python and install.....
Then after click python 32 bit option ....
Now see video...
Voice k liye Maafi chahta hu..🙏🙏
After installation
Ab aap basic chizo ko samjhiye...
Question apke dimaag aksar aata hai ki aakhir programming hai kya?
Choti si line me communicate with the computer hi hai..
aap(python) thelewale(computer) ke pass khade hoker golgappe mangte ho hindi ya english me......fir wo apke order ko fellow karta hai matlb ek medium ka use krta h...thik waise hi python b ek coding basha h computer ke beech hoti hai jo kahta hai...ki computer ye kr do ya na kro etc....
In English
What is programming?
Just like we use hindi or english to communicate with other,we use a programming language like python to communicate with the computer..
Programming is the way to instruct the computer to perform various tasks.
What is python?
Python is a simple and easy to understand language which feels like reading simple english. This pseudo code(ek code ki template hoti hai) nature of python makes it easy to learn and understandable by beginners...
Python ki popularity itni hone ki wajah ye hai ye itni asaan hai agar apko math b nhi aati hai..ya aapne kabhi programming na ki ho fir aap ise sikh sakte ho..
Features of python
Easy to understand = less development time
Free and open source
High level language
Portable- works on linux/windows/mac
Fun to work with......
Example ke taur se
Ek game/software agar aap python me bna rhe ho aur ek game/software c++ me...
C++ me sikhne time lagega but python me quickly bna loge...
Installation kal easily aap logo ne kar liya hoga...
Game ki tarah lo...
Wait to for chapter 1 Modules comments & pip
Its helpful for you then share ...
Ab anroid wale tayyar ho jaaye....
Google play store me jaye....pydroid 3 download kare
Phone me computer jaisa chalane k liye mast hai...
Kuch na janne wala b operate kr lega....
Type
print("hello world")
And run...
Import os
a = os.getcwd()
print(a)
Uske baad run kro...
print(a,3+7)
Then run...
Mazza aa rha...
Ab google play me jakr pyroid repository plugin install kar lo...kahi kahi paid hai dhyaan rakhna...
Paisa bilkul na dena
Free servics h ye...aap knowledge lo...uske baad certificates lelena....
Isme pandas ko install kr lo...
print ("hello world")
a=5+7
print(a)
Run kro...
Helpful lga to plz share ....

Target one to two month
Lesson 1- Installation
Starting se lekar last tak btane ki koshish krunga...first ten days lagega student samjh pa rhe ya nhi usi base per ye class continues chalegi....
For web...open browser and type python install
Python org wala link aayega use per click krke download phython 3.9.6 (ye abhi ka version hai)per click kar lijiye....
After download
Second step
Ab aap log second tab open krke vs code install search kriye and now download visual studio code
Jo bhi operating system use kar rhe hai...uska download kar lijiye...
Operating system agar aapko nhi pta lag rha hai to aap computer me my computer(window 7) this pc icon (window 10) ke right click me jakar properties me entry kare...usme jakar aap system type dekhe 64 bit/32 bit operating system jis tarah ka operating system hai wohi visual code install kariye...
After intall usko open kriye agree ment accept kariye next per click krke saare box click krke next per click krke install kar lijiye...
Vs code complete install ho gya hoga....
Vs code ek advance note pad ki tarah hi hai....jo kai features deta hai...aapko programing krne ne asaani deta hai...
Kuch log program k liye phycharm jupyter (from anaconda ) jo ki browser pe hi chlta hai...iski baat aage karenge....
Ab jo bhi work hum log karenge wo vs code me karenge...
Ab python ko install karne se pahle jo last me likha add python to path wala box per click krne k baad install krna....
Installation complete.....
Ab computer me search option me jakar window power shell search krke click kriye
Usme jo likha hua dikhe usse pareshaan na ho aap kisi me b computer me ho sakte hai kisi b os me ho sakte ho....
Usme python type karke enter maar do..see picture
Isme details pta chl jayegi...yellow color wala type kiya hai....
Ab installation complete...
Ready for coding...
Maine bahut hi saral bhasha me btaya hai Agar ye helpful lga ho...so plz like n share