#3 Python Tutorial for Beginners | Getting Started with Python
Video Title: #3 Python Tutorial for Beginners | Getting Started with Python
Welcome back aliens my name is wi d and let’s continue with this series of Python now we have talked about what is Python and we have talked about how to install Python on your machine it’s time to start with the actual stuff right and we are waiting for this now this step
One would be of course you need to open your IDE now remember in the installation we have installed two software’s one is the interpreter and second is your PI charm but will not be using PyCharm in this tutorial we’ll start with the basics so that you will be having that hands-on experience on
IDL II as well so let’s try it out so what I will do is I will open my eye IDL II and in that so this is your prompt okay so this is your prom this is where you will type your code now you know before going for the actual code we have
A question here why do we code and why do we like a code now think about this we are living in a world where everything is done with about computers for example if you want to send an SMS if you want to send an email you don’t
Have to do that your computer will do it for you if you instruct it example nowadays we have this amazing thing you know we have Siri on iPhone and then we have Google assistant on Android phones you know you can ask them to do things
For you example you want to set an alarm you can you know they will do it for you but then how they understand what you want to say so you need to talk to a computer and if you want to talk to your computer you need to understand their
Language right and the language which computer understands is binary code which zeros and ones now that means if you only talk to computer you need to you need to talk to them in terms of zeros and ones now it is not actually possible right of course
So what you have to do is you need to use a language which will which both will understand and of course do we so we all know English language but computer will not understand plain English right because we have some grammatical stuff here so what we have done is we have created programming
Languages now those are not actually example we have high-level languages now those are not exactly a binary code and they are not even exactly the same as English they are somewhat you know they have their own protocols they have their own grammar which we use so when I say
English so we have level one English then we have level two which is programming language and then we have level three which is your which is your binary format so you understand English so what you will do is you will learn a programming language let’s say Python in
This case and then you may write a Python code which will get converted into binary format which our Committee will understand so if you say hey computer do something for me so let’s go with this very simple stuff here let’s say I want to add two numbers so you
Will say hey computer two plus three a company will say ok five but then how we talk to a computer in this case so we are using Python and then we have a interpreter in fact in Python is for now as as we as we discussed it’s one of the
Easiest language right so what I will do is I would say two plus three this is the simplest task you can do on Python so I would say two plus three it works you can see we got five yes this is working what else what about subtraction
You know we we love mathematics right so let’s apply all the items of operations here let’s try nine minus eight it should be one right we got one say yes subtraction also works okay what else we can use can we use multiplication let’s try four into six which should be 24
Yeah that’s right we got the answer so yes addition subtraction modulation works what about division okay let’s try some of that’s a division it should be eight divided by four and I’m expecting answer to be – yeah it’s – but hold on there is a difference here you can see
If when we say two plus three be called five nine minus eight which is 1 so when you subtract two numbers we arguing that number right and specifically this are integer numbers right we all use integers but then when you divide a number it is giving you a point value
Now this point which is also correct float numbers so we have integers and then we have float now flow it stands for floating point representation okay but why it is 2.0 because we need divided numbers you might get two point values at example when you say five
Divided by two you will get two point five example let’s try it out so if I say five divided by two you got two point five and you want that point five value right that’s why it converts your number or your output into a float value because you want it they want to
View the exact value but what if you don’t want it what if you want only the cushion by the example when I say 5/2 you want only two you don’t want point 0.5 value so we can do that you know V if you want only integer output so we
Don’t want float now we want on the integer you can do that you can say 5 instead of giving 1 / you have to give 2 / now this is also called as integer division all it is also pass flow division say well I said on this query
What – so this is working yeah okay what else we can do here can I do you know combination of this automatic operation example let’s say 8 plus 9 yeah and then subtract it by let’s add 10 is it possible and let’s try it so it works you know so
You can have multiple operations but then we have to follow grommet right if you say 8 plus 9 and then subtract you forgot to type 10 there it will give you an error which is invalid syntax and that’s why you need to follow the grammar as well so in as in when you
Learn a language you need to follow grammars in the same way in programming as well you have to follow grammar can I use those brackets top which we used to use use in mathematics yes we can so example let’s say we have 8 and then we
I’m adding that value but then I also have a value which is 2 into 3 now which one will be done first of course the multiplication part right but then what if you want to do it all let’s try this first so you can see we got 14 which is
8 plus 6 but what if I want to say 8 plus 2 which is 10 and then 3 so in that case you need to use brackets right if you remember the point mass rule so I would say 8 plus 2 which is in the
Brackets and then in 2 3 so you can see we got idea so yes this also works so when you multiply so if you give a bracket it will be solved first okay this is cool right nowadays we can do here what if I want
To find a power of all you can say exponent you know so let’s say if you have to raise to 3 or 5 raise to 6 how can I do that so I will say – I want to find cube of 2 so in that case I can say 2
Into 2 into 2 yeah we can do that but then though what if you have 2 is to 10 you cannot simply type 2 into 2 into 20 10 times right because this will give like answer is 8 otherwise you can say – you can give double star and 3 so double
Star or double hash tricks simply means powered off so when you took two days to three so this is two hash trick hash tricks three and you can see we got eight so that’s how you have to find you have to do this all this
Operation so we now we know how to add two numbers how to subtract two numbers and then multiplication division a flow division but what else we can do here in fact you know we can we can also do modulus now it is modulus here let’s say I’m dividing I’m dividing two numbers
Which is ten divided by two or maybe three in this case that was a 10 divided by 3 it will give you 3 right but then we also have a remainder here which is 1 so if I even S it then divided by which is the integer division you’ve got 3
That’s right but what if I want to remain the part of it so I would say 10 and we have to use a special symbol here which is modulus and we’ll say 3 you can see we got 1 which is a remainder so
When is a 10 more than 3 you will get a limiter which is 1 okay this works yay now you know all the operators right now what else we can do here not till this point we have discussed about you know the the we are discussed
About two types one is the integer type which we have done here and then we have talked about float what other types we can have here can they have string you know what the string means it’s a combination of characters example my name Naveen is a string Python is a
String –kavitha is a string YouTube is a string right so we have to use can be can be a string here we can let’s try so what I will do is whenever you want to use string you should be it should be you should always use single code or
Double code so let’s try so I will use my name first so I will say single coach and I mean so we have to use a code Co so you have to say Naveen and I know you can see we got the same value and I mean
We got Naveen there is another way of printing these values you know you can also print by providing some functions or that’s a new word now note of functions in Python language we have certain functions which we can use another function is print now what print means or what function
Means is it takes a set of tasks which you will be doing so example in print which is inbuilt it has certain tasks which it will do you just need to call it can we define our old functions yes we can so print is a inbuilt function we can
Define our own functions as well so you can do all this operate in one function you can do that but we’ll see that later how do we define our own function but time being let’s use print and when you have a print you normally give this down package to pass
Any parameter let’s say if you want to pass something to the function you can do it here in this case I want to pass my own names I’m saying print naveen so you can see it works you got Naveen as a value there okay that works now if you say difference between the
Windy partier command here if you compare this one with this one see the output so in the earlier one the single quote is getting printed as well but in the second one it is only printing my name and that looks beautiful you know okay let’s try to print
Something else on once a print and here I want to print let’s say nothing’s laptop so no means laptop it should print novice laptop right when I say enter oh we caught an error that’s weird now what went wrong here now if you observe here we have single code as a
Starting one and then we also have a single quote here so that means that is one string and then this thing which is s laptop it is not as a part of that single code that’s what that that’s where the problem starts so you cannot simply have single quote anywhere right
So how do you solve this problem to solve this problem we have two solutions the first one is you in stop using single quote you can use double quotes example you can say print and in double quotes you can say in navin’s laptop now since so starting and ending
Is done with the help of double quotes you don’t have to worry about the single quote in between if I say enter and you can see record the output as the wins laptop now what else what are the commands we can do so this this thing
Works here I willing to think about this what if I want to print double quotes in a statement let’s say we have print inside double quotes I am saying now in laptop but I want to print laptop in double quotes can I do that example the output should be Naveen and laptop but
Then the laptop should win double quotes we cannot do that because you know the first double quotes and second double quotes will be getting entered here so this this is my first string what about this laptop now in that case we will be using single quote so single code and
End with single quote so you have to make sure the string part should be different from the part which are inside so inside we have double quotes then outside we should be using single quote like that makes sense right so you can see we got the output
But here’s a trade what if I what if I have both in this string example let’s say we have print I want to say navin’s laptop and you can see we have both now we have double quotes and we have single quote both that’s what the problem
Starts so what you will do now because if I say enter you got invalid syntax in that case we will say single quote navin’s and then in double quotes will say laptop the issue is with this s right this s is coming before a single quote
So you have to tell your Python hey Python can you just skip that special meeting of that single quote and the way you do that is by giving a slash so when you say backslash it will make sure that you it will ignore the special meaning of that single quote so we’re
Not Center it works you know so this is the basic fundamentals which we’re talking about let us do some fun here so I can we continue with the pain later but we have some fun thing here what if you want to print having two times someone you want to print now in three
Times can I do that of course you can try it you can type Naveen and then the beam again or you can also use a plus character here so if you want to concatenate two strings so we have two strings here right we have Naveen and we have Naveen so when I say
Enter so because you can see we have Naveen and that means we are combining it what do I want to print in domain three times or ten times in that case you know you can play with numbers as well so you can say ten into in single
Quote you can say Naveen and center you can see record Naveen ten times yeah so but his phone actually you know you can you can play with it you can do some experiment that’s amazing what if I want to print this one you tell me okay UK
You try to guess it will it work or not just pause the video guess it let me know in the comment section of it will work or not and then we can continue what I will do is I will throw in something I would say C colon slash I
Have a directive as Docs slash Naveen so pause the video think about it and let’s see what output you’re giving let’s try answer in term oh this is weird we weren’t expecting it will print say : Doc’s slash Naveen but unfortunately it is giving a new line and then I wind
What’s wrong now /n a special meaning in Python what is that special meaning and the meaning is it means new lines a slash and means new line and that’s what is happening here it prints it is printing C colon slash dogs and then it comes to a new line
Because of slash and it is saying oven ok what I do is I want to print it I want to print it as it is how do I do that it’s very simple you just need to cancel the special meaning of that thing right so you want to print this string
As it is which is also for this raw string so I want to print this one has a lower string in that case you just specify our before the thing and it will say C colon slash dogs slash Naveen so we are printing this stuff as it is
So when you say art it means raw string don’t try to convert it that’s what you are saying to Python hey don’t just try to cut don’t try to convert that slash it into a new special character and Center it works yeah so everything is looking good now so I
Hope you enjoyed it this stuff which we are doing here I’m playing with this stuffs and this in this video we have only talked about how can we use certain operators and then playing with printf in the next video we are going to talk about how to use variables now if you
Are enjoying this series let me know in the comment section about your thoughts and if you have any question you can put that as well I do read your comments by the way and if so that I can answer that in the next video and if you are liking
My videos so click on the like button and do subscribe the channel for further videos thank you so much everyone bye you
-
Sale!
Wireless WIFI Repeater Extender Amplifier Booster 300Mbps
$29.99$14.99 Add to cartWireless WIFI Repeater Extender Amplifier Booster 300Mbps
Categories: Electronics, Wi-Fi Router, Wireless Wi-Fi Extender Tags: 300Mbps, 802.11N, Amplifier, Booster, Extender, mobile wi-fi booster, Remote, WIFI, Wireless, Wireless WIFI, Wireless WIFI Repeater, Wireless WIFI Repeater Extender, Wireless WIFI Repeater Extender Amplifier, Wireless WIFI Repeater Extender Amplifier Booster, Wireless WIFI Repeater Extender Amplifier Booster 300Mbps$29.99$14.99 -
Sale!
Full RGB Light Design Gaming Headset Headphones with Mic
$24.99$14.99 Add to cartFull RGB Light Design Gaming Headset Headphones with Mic
Categories: Electronics, Gaming, Gaming Headsets Tags: Design, Full, Full RGB Light Design Gaming Headset, Full RGB Light Design Gaming Headset Headphones, Full RGB Light Design Gaming Headset Headphones with Mic, Gamer, Gaming, Gaming Headset Headphones, gaming headset wireless, Headphone, Headphones, Headset, Light, Mic, Package, RGB$24.99$14.99 -
Sale!
Wireless BlueTooth Multi-Device Keyboard Mouse Combo
$39.99$19.99 Add to cartWireless BlueTooth Multi-Device Keyboard Mouse Combo
Categories: Electronics, Gaming, Gaming Keyboards, Keyboard Mouse Combos Tags: Combo, Keyboard, keyboard mouse combos, Mouse, MultiDevice, Set, WireKeyboard Mouse Combo, Wireless, Wireless BlueTooth Keyboard Mouse Combo, Wireless BlueTooth Keyboard Mouse Combos, Wireless BlueTooth Multi-Device Keyboard Mouse Combo, Wireless BlueTooth Multi-Device Keyboard Mouse Combos$39.99$19.99 -
Sale!
High Back Leather Executive Adjustable Swivel Gaming Chair with Headrest and Lumbar
$199.99$139.99 Add to cartHigh Back Leather Executive Adjustable Swivel Gaming Chair with Headrest and Lumbar
Categories: Gaming, Gaming Chairs Tags: Adjustable, Chair, computer chairs, Desk, Executive, Gaming, Girl, Headrest, High, High Back Leather Executive Adjustable Swivel Gaming Chair, High Back Leather Executive Adjustable Swivel Gaming Chair with Headrest, High Back Leather Executive Adjustable Swivel Gaming Chair with Headrest and Lumbar, High Back Leather Executive Adjustable Swivel Gaming Chairs, Leather, Lumbar, Office, Racing, Swivel$199.99$139.99 -
Sale!
Professional LED Light Wired Gaming Headphones with Noise Cancelling Microphone
$29.99$19.99 Select optionsProfessional LED Light Wired Gaming Headphones with Noise Cancelling Microphone
SKU: N/A Categories: Electronics, Gaming, Gaming Headsets Tags: Cancelling, Gaming, Gaming Headphones with Noise Cancelling Microphone, gaming headset, Headphones, Headset, LED, Light, Mic, Microphone, Noise, Professional, Professional LED Light Wired Gaming Headphones, Professional LED Light Wired Gaming Headphones with Noise Cancelling Microphone, Wired, Wired Gaming Headphones, Wired Gaming Headphones with Noise Cancelling Microphone$29.99$19.99 -
Sale!
Gaming Desk with LED Lights USB Power Outlets and Charging Ports
$349.99$249.99 Select optionsGaming Desk with LED Lights USB Power Outlets and Charging Ports
SKU: N/A Categories: Computer Desk, Gaming, Gaming Desk Tags: and Charging Ports, Charging, Desk, Desks, Gaming, gaming desk with led lights, Gaming Desks with LED Lights, Home, LED, Lights, Monitor, Office, Outlets, Port, Power, Room, Stand, USB, USB Power Outlets, White, Workstation$349.99$249.99 -
Sale!
Wired Mixed Backlit Anti-Ghosting Gaming Keyboard
$99.99$79.99 Add to cartWired Mixed Backlit Anti-Ghosting Gaming Keyboard
Categories: Electronics, Gaming, Gaming Keyboards Tags: Antighosting, Backlit, Blue, brown, Gaming, Gaming Keyboard, gaming keyboards, gaming keyboards and mouse, Keyboard, Laptop, Switch, Wired, Wired Mixed Backlit Anti-Ghosting Gaming Keyboard, Wired Mixed Backlit Anti-Ghosting Gaming Keyboards, Wired Mixed Backlit Gaming Keyboard$99.99$79.99 -
Sale!
Wireless Bluetooth 5.3 ANC Noise Cancellation Hi-Res Over the Ear Headphones Headset
$119.99$59.99 Add to cartWireless Bluetooth 5.3 ANC Noise Cancellation Hi-Res Over the Ear Headphones Headset
Categories: Electronics, Gaming, Gaming Headsets Tags: 5.3 ANC Noise Cancellation Hi-Res Over the Ear Headphones Headset, ANC, Audio, Bluetooth, Cancellation, Ear, Earphone, gaming headset, Headphones, Headset, Hi-Res Over the Ear Headphones Headset, HiRes, Noise, Wireless, Wireless Bluetooth 5.3 ANC Noise Cancellation Hi-Res Headphones, Wireless Bluetooth 5.3 ANC Noise Cancellation Hi-Res Over the Ear Headphones Headset, Wireless Bluetooth 5.3 ANC Noise Cancellation Hi-Res Over the Ear Headphones Headsets$119.99$59.99 -
Sale!
Wired Sports Gaming Headset Earbuds with Microphone
$19.99$9.99 Select optionsWired Sports Gaming Headset Earbuds with Microphone
SKU: N/A Categories: Gaming, Gaming Headsets Tags: Accessories, Earbud, Earphone, Earphones, Gaming, gaming headset with microphone, Headphones, Headset, IOS, Microphone, Sports, Wired, Wired Sports Gaming Headset Earbuds, Wired Sports Gaming Headset Earbuds with Microphone, Wired Sports Headset Earbuds$19.99$9.99 -
Sale!
150W Universal Multi USB Fast Charger 16 Port MAX Charging Station
$49.99$29.99 Add to cart150W Universal Multi USB Fast Charger 16 Port MAX Charging Station
Categories: Charging Stations, Electronics Tags: 150W, 150W Charging Station, 150W Universal Multi USB Charging Station, 150W Universal Multi USB Fast Charger 16 Port MAX Charging Station, 150W Universal Multi USB Fast Charger 16 Port MAX Charging Stations, 150W Universal Multi USB MAX Charging Station, 16 Port MAX Charging Station, 3.5A, Charger, Charging, Fast, laptop charging stations, Max, Multi, Port, Stand, Station, Universal, USB$49.99$29.99
Mastering Java and Spring Boot – Live Course : https://bit.ly/TeluskoJavaLive
Coupon for Discount : TELUSKO30
For More Queries WhatsApp or Call on : +919008963671
print( 'c : docsmanny ')
c : docsmanny
print( 'c : docsnavin ')
c : docs
avin
why am i not having
c : docs
anny
Hi, Your teaching is excellent. Can you please tell me how to insert a new line every time I use multiplication for a string?
like navin
navin
navin….
I have learned Python basics before but still I found raw string as a new concept that was a useful one
superb
What if I don't give the command as 'print' and just type the string and enter?
Pycharm ,jupiter….
Can you share some assignments for hands on training. It may help people.
Best start for me
Thank you so much sir, It's great learning from you. You're doing a great job.
Thanks a lot
im learning python as a kid these videos really help
I have started my python journey with you. This is my 1st python lesson. It's amazing. I am gonna watch all of your video .Thanks for these cool videos.
>>>print('r'cool:teachernavin')
Pycharm
vs code
atom
Yes I like
thanks for the help
nice class!
Vs code,pycharm,spyder
1.Pycharm
2.IDLE
3. ANACONDA
Thank your very much sir, really enjoyed your teaching, pls what's the difference b/w / and in coding
Thanks for your interesting videos please describe the meaning and function of every term you use. I mix the sometime the meaning of colon
thanks
Awesome
3 IDE for python 👇
1) pycharm
2) VS code
3) Replit – browser based IDE
After watching , many videos of python iam able understand only your way of teaching .iam very thankful to you ☺️.and learning this python in short period of time
Phyton made easy 😊
well excellent teaching on python beginners and easily understandable
Thank navin
Thank you 🙏🙏 sir
I understand all .
i learning from u videos tq
You are video is very nice tnx
1.Pycharm 2.google colab 3.Anaconda
Best Video I'm Sri Lankan
hanks for teaching
thanks
I was really worried how can I learn python by simply watching videos, but this session of this guy has completely changed my mind, so interesting and the best tutorial for python, just go for it he is just a pro in explaining python in an effective way.
Thanks Sir
I was so irritated about python then when I found about these videos it helped me so much thank you…
Superb explanation sir 🎉
its not working for me in 10:15 to14:27
excelent materrial!!!
Notepad
Pycharm
Idle
IDE for Python are :-
Pycharm
VsCode
Python IDLE (default IDE of Python)
I dont have a laptop and cant understand it in phone