Hello friends, today in class 11th IP we People start your chapter number three. Friends, this is chapter number three, in this we People are going to be talking about Python Regarding the fundamentals. Yet I to you I have already told you in chapter number two that An Introduction to Python. How do we use Python Let's install the . how do we use it We do. In what way are we inside it can do the work. Like we have a There is an interactive mode. we have one There is script mode. how do we write code Are? How to run that code? all of this We talked about our chapter number In two. And now we will talk in three which we use in Python to create our programs Let's make it. So some of its fundamentals i.e. that its something basic you can say words those words like our english If there is a language then we use some words in it I use it. some words use in hindi We do. Some words are used. same way If we talk about Python In programming language, if we look at that if divided into small pieces We will have them made with Python Fundamentals. Friends in fundamentals I I want to tell you a lot of small topics I am going to. First of all I will tell you a A small introduction means that in this chapter we What am I going to do? After that we We will talk about characters in Python Scope. What are character sets? They Particular valid characters in Python We can use it inside. Other than this Friends, I am going to tell you about tokens about. tokens means we can say Here are the best of our program The smallest part. We call it the smallest You can also say Unit of Python program Are. In this, friends, we will see About keywords, about identifiers about. Identifiers mean something When you create variables, when you Create a class, or an object if we create any functions then Let's give them a name. like yours and mine all There will be a name. the name we give to people Friends, they also have some rules. They What are the rules? very small two to four We have rules. We will discuss this do. Then there were keywords like, had identifiers, we also had some There are also literals. Literals mean a Fixed value. like inside suppose x We have stored five. Friends, x What type of value is inside? Integer The value of type is . then what is the value of x do we have it? It's five. So what is a five Do we have friends? numeric here It's literals. Just like this you can put a string in it You can, you can keep the roots. We people Friends you can also store nun in it and We also have different types of sections here You can create it. Like list, tuple Is. All these things. After that, friends, we People will talk about it here after the literals We will have operators. like we have There is an operator plus, minus, Multiply, divide. even here You saw that we have an operator Equal. Then you have a lot of operators which we here one by one We will discuss. it will come to us after Punqueters. punctuators means that particular Symbols that we use in our Python Have to do it. So look at these five options are you have keywords like, identifiers yes, you have letters, you have operators And there's Punqueters. What are all these parts of? We have? of this token. Thereafter, we We will discuss friends bare bones of Python program means Python The structure of your program What is that thing near us, we are one You can see the full flash program here. After that, friends, we will talk about what we People create their own variables What are variables, after all? how in them do you assign it? Creation of variables We are going to see multiple assignments Are. of variables here we call the variables How can you define it? In this way, we People will see dynamic typing. That means that You have integer com, float in, float If you want to change com to some other type So we are going to see that also here. After this friends the last topic will be simple Input and output functions. to input For example we have the name of the function as our input and for the output we have a function Whose name is print. So we are all these all the functions of and these other topics which we have just discussed in the agenda We will discuss all these things related to the chapter I am going to continue further. First of all Friends, we talk Introduction. In the introduction I here But it has been mentioned that in this chapter we will There are so many things to see. so friends Here we are going to talk about our Python are the foundations, that is, the basic We have the fundamentals that we have We are the building blocks We will discuss and we will talk about it We're gonna talk about character sets, Regarding tokens, regarding expressions Basic input of, statements We have some information regarding output operations We will discuss. in the same way if we talk The first topic we have is Character sets. character sets are what they are What is? the character set forms the Vocabulary of Python Programming. Meaning Whatever words you use in Python, the characters you can use, which We have valid characters here But it is called a character set. it includes All valid characters. all of whatever You have valid characters like a, B, C, D, whatever you believe, they are all here Can be applied. So, it includes all Valid characters that Python can RECOGNIZE. Python almost all of them Recognizes characters. This We will have a discussion here in this manner that Python supports whatever We have ASCII characters. ASCII friends here is the full form of American Standard. Ok? So here your What's nearby? ASCII means you have Here is the American Standard Code for Information Interchange. So you have like If I say I use capital A If I did, there would be an Askew with a capital A Is 65. If we keep moving like this, Capital If we go to Z we will get 90. If If we go to small A then we get 97. If we continue like this we will go to small Z So we will get 122. in the same type Friends, if we talk about numbers then Yours will start from zero, do 0 1 2 like this It's till nine. so it starts with you From 48 to 57. if you press the space bar When you press it, the space bar number becomes Is 32. What do you have of all these? Its ascii code is . Each and every key has our All the keys you have on the keyboard has a number of. what do we know about that number Do you say anything? ascii code. So as many ASK as There are codes, it supports everything and also We have Python support here Unicode characters, which we call the International We are capable of programming Let's go to Python. So in Python everything Some are supported. If we talk about Here, there are some letters which we also have letters from A to Z and A to Z small ones too or upper case and If you say lower case then all this is valid There are characters. Talking about digits If we do it, we will get whatever we have from zero to nine All of them are numeric values will go. In the same way, the special symbols like space, plus, minus, multiply, divide or else we have exponents Or friends we have some brackets like this are there curly buses or other types too The operators that we have, all of them All the characters run in our Python Are. So what do we call this? here at Character sex. the same type of white we have space like we have blank space when you press the space bar you can type tab When you press enter you get a new line This is new feed, this is form feed, all this is ours Python has valid characters Inside, what do we call it, it's simple character sets like this we now Next we will talk about tokens, this is a big one The topic will be five different options for us will be inside this token i.e. token will be divided into five different points First, let us talk about what tokens are then the smallest individual units will suit you Just remember this if asked in the exam can be asked about tokens in python what happen? So friends what is the meaning of tokens What happened? Smallest Individual Unit You have these in a program. Similar Two Words in a Language. such as language I am someone similar to you like you If you use words then they are yours What do particular words form together? One Sentence. That means there will be a lot of words What does that make together? One sentence. Similarly, whatever tokens you have in Python Whatever we have now, we will see things in the future All these together form your program. Is. Ok? you can say they are the Fundamental Elements that Python Recognizes and processes. after that we talk Will understanding tokens be as essential as they form the syntax and structure of a Python code. This is all in Python code Together they make up our code. This five It will be divided into parts. The first part is Friends we have keywords. of keywords It means reserved words. to this thing Take care. In very simple words here But I have mentioned it. Then we this We will discuss it one by one also. So What are keywords? Keywords Means Reserved words have these special meanings. One There comes a question of number, two numbers The question comes. By writing this much you If I describe this then you will get the whole You will get full marks. Next is your you have it at second place Identifiers. what are identifiers Is? From Name of Name for Variables. Any any variables, any functions, any classes If you give it a name. like me If I write x = 10 then what is x? One Variable. You have given a name to a variable has given it. And what are keywords? Some? Our programs are reserved words In. Like if we talk about if, we Speaking of Else, we run the loop, so in the loop we'll have friends for The loop will come. We will have a while loop. This way You have a lot of different keywords Which I will tell you about further. Number three comes to us friends Literals or Values. Meaning of Literals What happened? Like I'm saying x's What did we store inside? 10. Then x What is the value of what do we have? It is 10. So 10 What do we have? It's literals. Correct Is? That means we have fixed data which We use it inside the code. comes again We have operators. What is an operator? As Here, we have used an operator Equal. Ok? You use x = 10, y = 20. What does it mean? that in the memory You have created a variable named x somewhere. y I have created a variable named . In x you put 10 Have stored it. in y you stored 20 Is. then you write z = x + y so first What will happen friends? A variable z is created and what will be the assignment inside z? of x and y Value means 30. then your 30 is What is the assignment being done in? of the name z inside the variable. So here plus equals So what is all this that we have? Operators There are. There are many operators. I I will tell you further now. after that comes Hey guys we have punqueters here. What are punctuators? Some symbols which we use in our Python Are. Ok? Let's discuss one by one. The first one will come to us, friends Keywords. What are keywords? this thing will remember it. I am speaking again. Keywords are reserved words in Python that Cannot be used as a variable name. You in a variable name, a function name, or You cannot use this in identifiers. Can be done. Like I told you x = 10 You can do it. but here I have it it happens that for then I write for = x I can't do it because the for What is? I have one already reserved here There is Word which is already built into Python It is defined. So words that Python needs You have already been told the meaning of those words There is some meaning in you. Python will print those words He takes it and does some work. so those words we People cannot use it as a variable here. So what are those words? All of them are yours what are passes called here? Keywords. Ok? They have predefined meaning. Their A meaning already defined Is. When Python was made, I told him about it Went. Every programming language has some There are reserved words. those reserved words We call these keywords. & R used to structure and control the flow of Program. What does it do? Our the flow of the entire program and its Works to control the structure Is. Like there are some examples. Example What is? Like if, else, while, There is a for loop. def to create function Have to write. Class to create a class I write. The function returns something. Whatever someone has to offer you by importing you Modules are what you do for your program Can be taken inside. you have a lot of these There are keywords. I will tell you through the table friends will come to us here like It is false, it is await. If we first look at Let's proceed this way. Here you can find these All three will see these three. keywords only There are three keywords whose first The character is big. We have one falls, we have one nun, we have one Pass True. Take care False Nun and Joe True we have a big first character It happens. If you write smaller you will get an error. But the rest of it that you see All of them are smalls. As We have an end. and we have a is the type operator. as you use it Can be done. You can use asserts. This We have lots of these types here you can find You will see that we have a lot of functions sorry we can say we have keywords are available which we use in different places We do. You can use some in conditions Are. some you use in a loop, some you It is used in functions. something you It is used in exception handling. This way We have a lot of different keywords Are. All these keywords are useful for us. Will not come. some keywords like we Here we will see what will be in our course. Who We will discuss the topic. like right now Friends in class 11th we have does not belong to the try block. of Option Raise Not there. Similarly, here we have If we see, finally it is not there. It is not acceptable. So here we have the class 12th comes in computer science. Exceptions Handling. It is related to the exception. Class We have passed 12th by deaf Let's define the function. del a keyword This is what we will use in the tuple in the list. When you want to delete the entire list Are. Here you will use if, l if to, to Else. So, we will see this In the course. We will discuss the math module here. Or else we have the random module, We will try importing it through import. in You have operators named . This is how it is Not all of these, you have some operators like this Which we will see in the future as well. So out of these Some of you may have operators. Some? You have other options as well. So the total What is this all together? It is predefined. What do we call this? Keywords. This Next to the type we have Identifier. The identifier means Tell me someone's name so that we can tell him So that we can identify. So what do we generally do it friends? So when your program when we create a function then we put some variables inside it We will have to make it. Like I'll tell you right now was x = 10 so do we have this one There are variables. You friends do this many times Let's create a class. When you create a class, you Create their objects. Just like that you are someone Create functions. You make a list and you make a dictionary. so you whoever is creating these objects you Whatever entities you create here have been. You must write a name for all of these What do we know about you and that name here? Do you say it friends? Identifiers. Correct Is? When we create identifiers, when we're creating variables here or any other class we like, object, function, list, dictionary whatever We are creating here for all of these There are some rules. The rules are simple. As Can be any length. Now no matter how big it is for you Whatever is available may be available. assume like I have a variable named x = 10. So x is a single character. Value Here I want to write student The name is STU or I could have written it in full like this hmm student name. Ok? Student Name I want to write someone's name equals to I am Aman. take care of your string It comes in single quote or double quote Is. I will tell you further now. Ok? So what will you do here? such a big name Can write. Even bigger if you want If you have any name you can write it. As Suppose there was a character here. This includes Suppose 101 He became a character. Write as big as you want I can write. Why should I tell these rules here? have I been? There is a reason for that. such as c 31 characters in programming language He considered only this. But if we Let's talk in Python as much as you want characters in your variable name or You can write any identifier in the name Are. Second you have must combine Letters Digits and Underscores. What does it mean that the variables you are creating like i want to create a variable STU One. So it's okay. Ok? here i am What were you going to do? Student 2 will do. I want to write Student 3 Will work. Ok? That means you can do that Are. you can also write student Underscore one will do. You can also write this are student underscore two will work. Ok? But friends, you have to keep this in mind that Not starting with digits. you don't do it Can. first student or second student Or the third student. you don't do this Can. Your first character is not a digit Can. The first character could be yours You can use any alphabet or underscores like instead you can write this can run under one st because What is the first character coming to you? underscore you'll do st underscore one will do underscore one st will do but not if you do one st One underscore will work, even the first one will not work character you just don't have those digits You should have some other special symbols Cannot use it here. can not use Special symbols. That is, you can add any variable want to make. you wanted to write STU*TOO you can't do this. you this Can't do it. STU@1 These are also variables It can't happen. what you see in the middle These are special symbols. Special Symbols may have only one use. His The name is Underscore. In addition, friends, you Cannot use any keywords. As is I told you earlier also that when we Keywords were being discussed here. I I told you here also that you have given It has predefined meaning and you should not use it Can be used as a variable name or identifier. So this line is written here that can not be Used. Ok? As an identifier. you are here But they cannot be used in this manner. These I told you the same thing here also. after this Yes friends, we have literals. Literals what happens? Fixed value. Ok? So I would remove the literals here. Am. What do we have with literals? There is a fixed value. Ok? what is that Do you have it? like we want to write are a string literal. as suppose so I have written S for Suran. Ok? This This way you have a fixed value It's done. Like I'm trying to write x equals Someone's name is Vinay. We have set a fixed value I wrote it down. I'm trying to write y = any Suppose I want to write to C ok this is an address let me write it down I want z ek ek city like i write I will give you Jodhpur so friends what is this we have a string what is the string You have a collection of characters or with the characters you can You can add numbers to it as well but that Friends, it will always be written in single quotes either you write it in single quotes Like I am seeing the example or you We will write it in double quotes. like here You are looking at an example. or friends You can write it in triple quotes also. You have to take care that you have triple coat and you are single coat Whatever it is, press it three times. don't do that once you press the double quotes and After that you press a single quote and then three. This is the error you have, friends. yes, if You want to use double quotes three times. So it will work. and if you want single Using the coat three times will also work. Ok? So keep this thing in mind. either Single quote or double quote. whatever you use You can take it if you want. Ok? So this you will take care. press single quote once Or once you press double quote it will run. And if you are taking it thrice. when does this work is it coming friends? When you guys use multi line Writing data. Now from here I go a little I am telling you things practically. Ok? So I start my ideal here. I will do it. and friends come here After that I create a new file of mine and I'll write its name, I suppose Demo. Ok? I will save the file and I'll put the name of the file here But suppose it's a demo. Now what do I do with it Am? I will go and write it down. Suppose one The variable is x equals x to whatever you I will write it down, x equals to someone The name is suppose I go for double course I am writing. Ok? I write my name I will give it like Surendra. Now I wrote this Gave. and then if we print this If we want to try it out, we can write Print of x. Ok? I save this code I will do it and then run it. How to Run We do? From F5. you will see mine here The name is whatever string I entered It got displayed. If you want friends write this here y equals two if I change this If I want to write in single code then go to Will go. Like I write Solanki. Correct Is? I will save this. I this too Let me run the variable named y also. Like I saved it and ran it. You Suren and then Solanki will see this display Done. if you want it here Suppose to display some address like Suppose someone's address is 24. Ok? Like 24/e suppose you have an address CHB and I write it like this Jodhpur what is happening in this we have to tell You may also get numbers coming your way Are. Ok? Special symbols are also coming And some more characters are also coming. So this Do you want to put it in single quotes or double quotes? If you want to take it, it will go. Ok? in this manner You want to go and print this out. I write print off z you save I will do it, I will run. The third line has arrived. Correct Is? So in this way we have single here quote, double quote and multi can be called triple I will also show you the quotes. Single quote double quote you must have understood. If I want this guys our data It is a little bigger. In multi line you need So you'll see here you have it now An error will come. I am running this code. Will you see what comes to you? An error. I am not able to understand this. it feels like That is the code you wrote here. Correct Is? If you need that code I will return it here I will open it once. Ok? that my This was the file and he did not understand it It seems that you wrote 24 single codes Why didn't you shut it down after that? So It seems to him that this is the same line. If If you think it is multi line then What do you have to do? Single code can be converted into three I'll have to take it to the bar and write it down and bring it back Will have to close it as well. not three times then complete Now your full code should be multiline Will go. I run this code. You You will see here you have this multi line The code was done. Ok? This mostly gives you When will it be needed? When you see something like this here You will have to code as you will see later. Suppose I would show you by writing it one more time Am. Like I wanted to write here Suppose that's one for edition. Ok? I it I want to write forest. For whom is the forest a forest shall I write it here? Suppose that the edition For. like it happens enter a number enter a Choice. So we are going to write for choice There are one for edition. Ok? in the same type I suppose I will write that too. So I to this Now if I want to take multiple lines so what should i write here single quote or whatever you're taking double quote three Once again in this way you are suppose to be one for one If you have two for subtraction then you can do this this way we can write it okay three whose I have assumed that for multiplication and if you want you can write four for Devise okay you wrote it in this way and If you want to write something you can do it later Stop when at last you see print You will have to print this whole thing. So you What should I write after going here? One Take the variables. e.g. x = then the whole data In which did it come to you? In x. you to him Print it. You will run. this multiline You printed the code of this at once Is. I hope you guys understood it If you want data in multiline then you want to display it, you can pass it into a variable By putting it you can make it run. And you If you wish, you can do it in print also in the same way You could have written it directly also. Ok? So I wrote this code. You will see this multi We put the code of the line in a variable I have got it printed. I hope friends this You must have understood that here single and Double line and triple line concept. Ok? So what are we looking at? sing here string literals. so here But I have mentioned text enclosed these codes. You will write single in codes You can use quotes, double quotes and triple quotes. Can be done. After that, friends, we are here Let's talk about numeric literals. Numeric What are literals? in which you number Let's store it. like x = 5 ok? = 3.5 If you print the value of suppose x value and if you go and print y The value you store is yours Like 5 and 3.5 will also come up, okay? If What do you want to see here? The type of data is stored. is this Integer and float or not? So you also Can do it. For this we are here for another we use a function whose name is We have the type. Ok? type of x if you keep in mind this type of x is this one There is a function named type. In this we wrote x And we have implemented this whole thing in a function called print We passed it. means we have two functions People are using it. and so if I multiply y by type then you will see our Integer and float are getting closer. If we the people Suppose there is also a string like z Equals to anyone's name like I own mine Let me write this down. So if I check here I want to suppose that's why I'm here I can go and write x here I am y and I go in and write z you First we will look at integers, then floats and then STR STR means string so a I have told you just one extra thing. There is also the type function which allows you to type any Specify the type of the variable to be shown If you want to tell then you can use it. Correct Is? Similarly, you have this integer here. was and you have float. the integer that you are You can also specify it in binary here. Are. Here I have written 50, you have written zero Any binary number after b Even if you write it, it will store your number Will do it. Although these concepts are part of our course I am not there. So I am also focusing more on this not doing. You must be looking at the float. it You have a float i.e. 14.5 this number If you want scientific that is putting in exponential value then you You can have it if you wish. But in our course Not there. We shouldn't be too confused Want. So friends, I want to tell you this also I am not telling. Ok? means its use We don't do it. After this comes your Pass Complex Number. Complex Numbers What happens? You have the real number and one Iminary number. Ok? So here you have an R And this is an imminent number that you have. Like 7 + 5j. So here you are a Let's look at the complex numbers. Ok? So Complex numbers are also included in our complete course Not there. only an introduction was given Even here. So, I told you this also. What will come in handy to us, friends? Friends Here integer and float and in that also we have Pass with a simple number and a simple point Value. Ok? this is throughout our course Has gone. after that we will talk friends Regarding boolean literals. Bullion in which It will either be true or it will be false. Memory Remember, I just told you the keywords. It was said in it that there is one which is true, there is one falls and there is a nun whose first The character is capital. so take care This is true and false. True to Friends When we talk internally about computer it treats him as a one and falls to him Treats as a zero. Ok? to this also Let me tell you a little practically. As I write suppose the value of x is 10 and then Let me write y = 20. Now I am here Do I want to print it? x what it is Equ to equal y. x and y Are these two is the value of same? I save it. Run I will tell you about the falls. Ok? So What is Falls? We have a value that that is of boolean type. and if friends Here I wanted to go and write that x What we have is less than 20. So this too We have it right. So this time its answer What will come to you? True. I hope friends You must have understood this. Ok? This Type next friends if we are here but let's talk about it here it comes to us Pay here is special literals special What literals do is they return non-values stores like i'm here again Python because I shut it down again So if I start here I go and print the value of x, error there is no variable named x so I If x is to be stored here then x = 5 then if we go back and do x then the value of x The value will come, I am doing y and getting an error if I think of that as a variable I'm creating Should I give it? I will enter the value later. so I can z = nun. That is, I have written the name z I have created the variable but in this What has the store done? Nothing. Nun. So Now whenever you press Z you will see your Nothing has been printed. what in z Is? He is amputee. It is empty. Ok? you are such Cannot write directly. There is an error in A It will go to you. But you can write this b = nun. And keep this in mind as well. If you have written in double quotes or in single code I wrote it down. Now this is your string I told you about the nun who is also a kisser You will get your first character capital in and it will be enclosed in single quote or double quote I do not want to write if you are okay with it then I will write it to you I'll run the bar after that when you see the B So the value of b will be empty. In the same way friends, next if we If you look here, we have seen all four of these So in the same way we have another one That is the collection of literals collection of literals what do you mean like you have five here Storing different integers together If you want you can make a list here Can be done. Similarly if you take five different or You are taking four different numbers which you You could have made a list also. you do it the same way You can also create a tuple from it. just this is the difference that here you can put a square bracket Let's use the . while here you are Using parthesis. In more detail I will tell you further. We have a whole chapter about list, about tuple, About the dictionary. in the dictionary you will find this Can you tell me? a means its value is Apple and B means its value is ball. We have created these alphabets. So, you The dictionary that is made here, which one Do I make it? You inside the Curly Buses. You have to remember this. After that you have Comes with a set. set not in our course Well, just an introduction. so what is the set It happens? Like you wrote the vowels and In vowels you wrote A, E, I, O, U. Here you will see, this is also in curly buses It is just that. But, what is there here? Curley In buses, for example, A, the value of A is A, Colon you wrote Apple. Ok? this type Then a will have some value. Colon applied You are telling by doing it. so what is it here Is? you have one and this one you have What is the value of and what is the whole thing? You have a pair. same type here If you look, there is a separate pair here It has not been made. simple c values are Which you can store. Ok? So What do you have? It is set. We forward this And we are going to discuss it as well. So We have these sections. Once this I will show you practically. So We are here once again ideally Let's start. like guys i am here But I will create a new file again, right? We will save this as well. suppose that So what did I say here with the name demo? did you write it? Creating a variable with an el name I am L equals two and guys here I am I want to go and write something. like a student whose roll number is 1001 and I suppose I will write down its name It is Suren. The marks he got, friends It came to 98.74, suppose we entered the value like this Gave. What did we make? A list named L. I can also create a tuple using this type. I want to store the same data in tuple also. I have been. Ok? Just inside the tuple you get what needs to be done? t equ to you these ones You will have to use brackets. Small Brackets means parenthesis. in the same type If you want to create a dictionary. d You go inside equals to curly buses I will write. Like we have the roll number. Ok? So what is our roll number? Will you go? I am writing 1001 with a colon. If I have to write the name in this manner. Correct Is? So I will go and write down the names of our What will be the name that will pass? so I write I will give it here like Surendra and here But I want to write it again with commas. What are his marks? so I would write I am here, we have the marks he has Suppose I write it here like this 98.74. This is the way we do it here You can specify. Ok? So we have Made three different things. a list a A tuple and a dictionary. print and view I want, friends, to go and write it down. Print of L. I am copy pasting it like this I will do it. these three one by one I will print it. is a list, is a tuple, We have a dictionary. Save, Run Do it. You can see the value of all three. Now what is the difference between these? The difference is this That if I by the way go here and write. Let me change the value of L. As is L We have. L which is two, the meaning of two You have it. like this first value You have a zero count. His Index. after that there is this forest and after that yes to. Be careful where you start Does it always happen? From zero. so here I am I want to write about 2 which you have The value is Its value was 98.74 friends 74.98 suppose this was the value. we did wrong Gave. If I do this when I print I am trying it, you will see it later Well the issue here is that of 2 = right? It has to be done this way. l OF 2 = and then you have written the value. You We will see that the value here changes. Has been. then you can change the value Inside whom? Inside the list. but that's the work If you would have done it for a tuple then in the tuple You can't change it. will come to you Error. Look, you have got an error. which is the tuple object inside that you can see the item assignment here Will not support. it will give you an error will give. Ok? So you can store the data want in the list. You store the data in If you want to do it, do it in a tuple. But What is the difference in this that in the list you You can modify it later. but the tuple You cannot make changes in it. The whole chapter Ours will be next. You might have seen it in the book. And if you look at the dictionary that we have created. If you would like to print this out, you can You can write here. inside print d I want to show you suppose that name. so i go Let me write down what D's name is, after all What is? I will go here and write it down Am. I will comment on this place once I am doing it. what is comment friends? This line will not run. You just need to Next, you have to apply the hash. put this code now Your comment has been created. I'll run it. Would you like to see what is written here? Surendra. If I am here Surendra i.e. that instead of name I want marks To display. So let me go inside it What will I have to write? Marx. as you It is written here i.e. M capital, you will get it the same way You will have to write it down as well. his marks are Will go. So, these are the values you have here Like 1001 keys of this can be made. This way You can make the key of this name only. these values and these are like the keys you already have What are marks? has done and 98.74 What do you have? It has its value. I hope friends you understood this will be. So, today we have discussed Down to the literals. then we have some more Topics are also coming. So that's all of us We will discuss further. Friends, now we Here we are going to discuss operators about. After all, what are operators? So What are operators friends? So our basically if we look mostly if we If you see, we have a symbol like plus like minus like multiply like Divide or equal or many such We have different types of symbols and we use these symbols here do you do it for any of your expressions or You can say for calculations or different There are types of operations which we will discuss here one by one We are going to discuss it. Friends most first if we look at this we have There are different types of operators. like most First we will have arithmetic operators. what are arithmetic operators Friends? performing mathematical operations Are. For example, the value of x is 10, the value of y is it is three. If I have to add these two numbers If I have to do it then what will I use? Plus. Now if I want to delete something from x i.e. If you want to minus then it is minus. Just like that We have multiply, we have divide. Now If you see us, maybe these three new You can see the type operators. If I say 10 / 3 see I have it 10 / 3 So what answer is he going to give us? Here? this will give us 3.33 if we Requires float value. So if we get 3.33 What will we do if we need it then? Divide. But we want only integer types be the value of. means after the point We don't want value. So instead we what will you do? We will apply double divide. Friends, we call this the floor Division. Ok? The result is with you Three will come. And if we write x like this What we have. Ok? If like I I write at the time of print that it is 10 Now if I want to see the modulus in that Am. What does modulus mean? 10 We will divide it. Three. How many Do you go to the bar, friends? then run three times Went. What came back to you? Forest. Forest What do you have? There's a reminder. this which You have a reminder, you give it to us There is a percentage symbol. So in total We have a number of operators who that there are arithmetic operators. Just like that Friends we have some bitwise operators Are. There are different types of bitwise operators We have. like that we have some There is also the identity operator. as is and is it not there. of the same type we have some There are comparison operators. Like this if we If you see, it is about equality. These We have not equal. we have this It is greater than. This is less than that. this grater Then equals two. less than equals two Is. Similarly friends we have some logical There are also operators which we call And and or and and not. In the same way our Some assignment operators are passed. For example, if we look at it, we have a simple There is an assignment which we call equal Are. In this way, if we want, plus We can say equals two. means any value If we add five to it and get it back to the same so we want to assign plus equals Let me use it for two. Minus from the same type equals two, multiply equals two, Divide equals two such operators which we have for the assignment operator come under the category. and just like that we have There are also some membership operators who provide us with Does it tell you that the value is correct? Its Is it inside or not? So we are in and not in is also used. to them friends i I will tell you one by one. First of all we Here we will talk about arithmetic operators Taking it. What are arithmetic operators? I just told you that this is Operators are mathematical values Or we use it for calculations Let's take it. What do we have in this? As Plus if it's there then we're here for addition Use the plus. as I suppose I have The value is the same. like i just wrote x The value of is 10, the value of y is three. If I write x + y then we get the result What will he give? 30. Give us x-y like this will give. x * y will give us 30. just like that x / y will give us a value of 3.33 something. if you Want to see what reminders are left? Then the forest will come to you. Here you have it Double stars guys. Meaning of double star What happens is that you have the exponent. Basically we can call it power. As that 10 to the power is 3. you will see 10 The value inside x and inside y is three. So we We can say 10 * 10 * 10 which means 10 10 And 100 10 so your result is here 1000 and if you want flow division here means there is no value after the point If you want you can put double divided here We give it. I will apply this a little practically I will show you by doing it. we guys go Friends, inside Python. I am my new I take the file and go and write it down Let the value of x be 10, the value of y be I suppose I have seven or I can give it three I will do it. Ok? to this same example Let's take it. I want to print it in I want. Ok? So I write down Here is the result. Ok? result is joe This is our result too. So I put it here I will go and write the result. Ok? And going inside it I have to write like Which is our x plus y clerk. Ok? So I got different results like this here Have to display. like the result of x + y what will come? What is the result of x - y? Correct Is? What will happen to the multiplier? Double What will happen to the multiplier? what about the divide is he coming? What is coming of Double Divide? And then we get the modulus operator. Ok? So guys, first of all we have This one, whichever one works, will give us 10. After that If we have 10 and 3 then we will get 30. from it will come to us 30 and it will you If you see it, it will come in 1000 Let's see this one Sometimes we save it like I did this I will save this with the name demo friends I run when I run this The code is correct as I ran it you can you will see this came to you okay this is done You have 10 + 3 10 - 3 10 * 3 double Multiply means you have the power It shows that you have a divide like this You have flow two divisions which are double is creating a divide and you have it Reminder. Ok? I'll give you another reminder I want to show the value. suppose that I I will go here and write 27. Ok? 27 And I would go here and put it friends I am five. So what will be the answer to this? If this If you understand it, you can definitely tell me Please tell me. Specially in this last one here x m y what will be the result of this? if possible You must tell me in the comments. Ok? In this way friends, next we who Operators are going to see if he comes to us is the bitwise operator. these operators are our Let's work on particular bits. Meaning If I were to say to you, for example, if I were to write I suppose 10 or 20 or 30 whatever number you are I write. Suppose I wrote 15 then the amount of 15 Binary is 1 1 okay? in this manner If I want to write suppose here 31. Ok? So its binary you have 1 1 This is binary. I remember that as I I am writing here. You can choose any number You can extract the binary. Suppose you will get 20 rupees. If you want to take it out, I can take it out here But. like you have 16 and this is your Four was passed. So you have this for 20 It became binary. Ok? In this way you You can take other numbers also. So when you If we use bitwise operator then this bit wise operator and and x and or not these which You have operators, these are the bits of that number. It goes over and works. Her Binary It works on Pay. So let's look at this now because this is a little different from yours will go nearby. First, you need to understand binary numbers will have to be understood. then you can use bitwise We will do it and by the way this is so important No. So I'm going to skip this one a bit Am. Then we can talk here. There we have the identity operator. Ok? That is, if we want to see that is there a variable like I have a I made the variable x have the value 10 and then I I write the value of y as 20. so what would have happened is it friends? There is a key named x inside the memory It will be a variable. There will be a variable named y. One will have 10 and the other will have 20. But others I am talking about the case. I wrote down the x's value 10 and the value of y is 20. So what what happens friends? somewhere near you Just like 10 are stored in memory 20 is stored somewhere in memory. we named it x we named it Given y are basically variables. x and y are what happen? There are labels. where there are 10 stores Yes, I have named it. going forward if If I write z = x it means that what is stored in x? 10. so where 10 there is a store its name is also x and its The name also became z. So that means saying a We created two different names for the same variable Given. Made two different labels. Now if I want to see if x and z are the same he is pointing to the location so I am here But I can use it. like if we See here, do it practically like I did I was trying to write x = 10, y = 20 and z = I'll write x here. Ok? Three There are variables. I am printing it here I want to see it. Firstly the value of x. then I'll take the y key here and then Later I will take z's. So y and z. I this I will save the coral and run. You you will see that the values of x, y and z have arrived which That's 10, 20 and 10. Now friends I tell you Here I'm going to use another one for you. Function named id. I am here inside this print function i am writing ID of X. It means X which is memory It must be saved somewhere. and where it was saved Yes, it has an address. it has a location In my RAM where it's 10, 20, 30, whatever value is stored, anything is stored Yes, it has an address. and that address I want to see what x is here. What is his address? what about the y Do you have an address? and what is the address of z? I What am I looking to see this address? His ID. You can observe here friends do. It was x. This is what you had z. x and z What ID do you have for both of them? beans are And you had this address. his We have different IDs. So any address what use are we here to see Can you do it? The function named id. You to this Please watch it. Now I have shown it Anyway. But still I want to ask you this I want. you know brother inside the print I write that whatever is x is y. What is the relationship between x and y Are both the same? then it will give you the result Either it will be true or false. What is giving Friends? Falls. x is y no no no x and y is different. 10 in one, 20 in one Is. I say x is z what is x and z? There is only one truth. Both have the same address It is nearby. So what is he giving you? These True is giving. Ok? if you like it like I wrote is. if you want here You can also write not. is not means the opposite Will be done. x is not z. What is this thing? Falls. Because both are the same. so What do you have written? The falls have arrived. Ok? So we just discussed this have done it. In another such example, we are looking. Suppose we made a list Given 1 2 3 in a variable named x. I I write y = x both at the same location I am pointing out. I write x is y x and is y the same? So what is written here Did it go to you? True. Ok? take care I have made a comment here. This we They say comments. That means this line The line we write after the hash is We don't get runs. in the same type Friends, next we have relational Operator. We will discuss these relational operators here. But sometimes comparison operator is also used. Because we are comparing two values We do. like we have a variable x is a variable we have y. inside the x What have we stored, friends? here at 15. Ok? and what do we store in y Have you taken it? 10. Now look, I say x equal equal y are 15 and 10 both equal Is? Not there. So what is being written? Falls. so I say x not equal y We call this not equal to here There is also a mansion. I am talking about x and y. The value of both is not same. there is one value and one is their location which we have I had read this one before. Ok? These What does he work for? At the address. Location Pay. Is and Is Not. so what do you call it are we? Identity operator. but these ones What are the operators you are seeing? near you? This is working on values. The value of both x and y is it beans? if both have the same value Then it will be written as true. If not then what did you write Do you have it? Falls. I say x And y is not equal. Said exactly the right thing Is. I said x is greater than y. from x y It is big. Yes. I said x is smaller than y. He is speaking falls. I said x is bigger or is equal to. Greater than and equals to. You will have to use two operators. If Even if you have the same value for both It is true. and if the value of x is large then You will also get true result. i.e that x is either greater than y or if x is equal then it will give you true and if x is equal to y If it becomes smaller then this will give you falls. And Similarly, x which is less than equal to y x y Is it smaller than? What is he saying to you? Falls. So what do you call these operators? This is the equal operator. Ok? This Will be used for equality. this knot It is equal. This is greater than. it is less than Is. It's greater than equals two. and this We have less than and equals to. After that comes the logical thing friends Operator. We have three types of logical operators consists of. very carefully Please see. There is an and, there is an and, One is called a knot. if i spoke to you like let the value of x be 10 and the value of y be 10 It is 30. I say the value of x that you have I saw it. The value of y that you saw. I so I say that we have x is > and Equ y What is x and y Compare these two I have been. Is x greater than y? result What will come to you? Falls. and I speak am x which is > and equals 5 is x five is greater than? Its result will be true. Whereas Your result will be false. So See, there are two conditions. now I want Comparing both the conditions with each other. I am comparing two conditions. Ok? Its result is true and its result is also If it is true then what will be your result? True. Otherwise what will happen? Falls. Ok? So Here I have written these operators Combine condition statements. a table of I will make it and let you know. like if We have the first condition is true. Ok? we have second condition True. So what will be our result? True. Otherwise it always falls. Whether it is first False or true or we have first be it true or false or our friends Both of them should have both the falls. This too There is a falls. This is also a falls. All these three What will happen here in the case? Falls. like its Let me show you an example. I suppose I want to login to your website. I want to login with my email. So What will I have, friends? One would be What would be the username and password? I have my User's password. Ok? so here I am I enter both the username and password. Value I entered the correct username, but the password is incorrect Put. What does it mean? The first condition It is true. What should I log in to from Second Falls? Needed? No. So what did I say? The first condition is true. But seconds If the condition is false then login will not happen. The condition is yours false. If I enter the username and This time you entered the wrong username and password I will enter the password correctly. The username which is I entered it wrong and I have entered the password Corrected it here. So what happens now? Falls. If I enter both wrong then What will happen? Falls. And if I If I do it right, what will be my result? Finally true. I FINALLY log in. So what does the end do? two conditions Compares them with each other. While the other You have it here and more. what else works is it friends? either one of the two The condition must be true. then your result True. Like I go to the bank and ask I want to get my account opened. so I I go there and tell you to open an account Is. He is telling you from the front, someone You will have to provide documents. either you me Bring your Aadhaar card or give it to me bring it to me or else you can give me my PAN card Bring it. Either of these two is your If you have a document then your account will be closed It will open. Now I have an Aadhaar card But no password sorry no PAN card Even if it is there, it will open. Have PAN card, Aadhaar It will open even if there is no card. both of them Even if I have it, it will open. But both If it is not there then it will not open. It means And what is there in that table? If the first condition is true and the second is true then the result Tru will come. The first is true, the second is false The result will be true. The first is false, the second is true Even then the result will be true. But, if both If both the conditions are false, then The result will be false for us. Correct Is? You might have understood this. As it is written here, x < 5 and x > 20 x which is smaller than your five if it happens ok for example let's say x < 5 let's say the sum of x value that we have is 28 okay so This is the condition that you have, so what is it? you don't have false x < 5 but what is it saying here x is > 28 i He said yes so this is true or false What will be the final result you will get? Will be done. Ok? You have one like this Not passed. What does NOT do? Reverse the result. Ok? Return False If the Result is true. As I speak x is less < 5. Ok? and x is < 10. like mine which The condition is, suppose the value of x is correct Is? I will put the value of x here. But. Suppose three. So I say x < 5 What result are you getting from this? True. I say x < 10. Its also What result are you getting? True. Correct Is? So what will be your final result? Because it is an end. what is the final result near you? True. So this is complete truth what will you make? Falls. Ok? I speak am not x < 5 and x < 10. then your result True was being made. but he said not to her Is. So what will happen? Falls Your Bun Will go. Ok? You must have understood this. But I will tell you once practically Am. For example, the value of x is 10, the value of y is Suppose I have 20. I write print x > y ok and I put end and x is less < suppose I would have written I do one thing, I do it this way I will write it from. Ok? what are you writing am I sure the x I have is okay? is greater than a suppose that 5x is greater than five and is smaller than 50. Ok? try putting n Are. What result are you getting? True. Both the conditions are true. but if I'll do this instead of suppose less than I will make it 15. less than 15 then This condition will become our false. Whereas The second one we have is True. Final What result are you getting? still The falls are coming. Ok? because what is this Is it happening? You must have the first condition There have been falls. But friends if I end What should I put here in place of '?' what else Will we have it? what is the result coming Is? Now this is coming true. Ok? Meaning It will work even if the first condition is false. The second one is ours. either of the two is also a condition true. The result is yours It will go true. and like this if you want Just take the reverse of this: let x < 15 I wrote this okay > 15 okay so What result do you have right now? True. but what will it do to you like you had it first make it falls given this is true ok x > 15 is false what did it make you have true and Suppose here we have the value 100 100 > 15 is true but what does it matter to him It will make the knot i.e. the falls near you The result is coming. Ok? So you understand this I must have come and and and not be. This Comes to us friends from type assignment operator. One is simple Assignment. Just like we are doing here right now have been. You will see what we have done inside the x Is done? I added 20. Ok? or 10 20 whatever you want its value to be. Value Take the value of x, I have put it here 10. Now what do I do here? Print I do it. Whom? Value of x. Ok? I write it just like that. The value of x is Ok? I will post a message like this me and here I put it double Quotes. You will see that the value of x is Let me try putting a comma here in front of us. Is it being displayed? absolutely getting Is. now what do i do here Friends? I will copy this. I further I go and write x = x + 5, which is the sum of x The value was 10. What did we do to him? 15. I'll print it back. You will see this Will the bar operate? first 10 then 15. So, I added five inside x. Is done. Ok? now write this line What do I do for this, friends? I comment here. write the same line For , we can also write like this. 4 = 5 Both are the same thing. Its meaning is also the same will come. Its meaning will also be the same. like this Suppose I add two instead of times five Am. This line will work. first 10 prints Will do it. Then he will add two to it. near you What is the result friends? 12. Correct Is? If we look at it in this way, then our It could also be like this nearby. I write x - = suppose I write 4 or friends You can also write here x = x - 4 You will have the same meaning for both of these yes. Ok? So you reduced four from 12 It's over. Just like that you do x = x right? I I want to write x = x * 2, so it was 8, so 16 You should have it. I print this I will do it. You will see that you have the result What's coming? 16 But if you want to Could you have written this instead? 2*x = 2 So its result will also come to you the same as we just saw 16. Just like that your There are other operators as well, friends. x Like you saw the double multiplication in which I was showing you the power. Ok? So, this is what I do. after this I do print. You will see that you have It is coming. here I put it at this place I am going. Ok? this is your result Was. Now I had to see it. Ok? Then x Whatever you have, 10 is fine? 10 * 2 your It is getting passed. So this is showing you. Ok? Like we just saw here. Me What should he do? here in this way You have to apply equals to. You will see your Whatever value the pass had, for example if it was 16 then 16 Here you have two times i.e. 16 * 16 The value is revealed to you. Ok? Here, what had become 16 is 16 after eight. Then this 16*16 result has come to you. In the same way if you look at it here like this There are some other operators also. So I just told you told me did you have one here Equ + = - = Divide Equals Two Just like this you These operators can also be used here All of them are just arithmetic operators There are parts. Now look at this, we are First you have an operator, we call it This is called a simple assignment. it It's a simple assignment. While these ones which you have it, it's called compound Assignment. because it also does plus and He is also assigning it along with it. Ok? These What should we say to this person for doing two things? Compound assignments. so I put this line here I have mentioned it from. These operators are assigned Value to variable. The Basic Assignment operator is equals to but there are also Compound operators that perform compound assignments Let's work. These are all of all. After that you get membership Opera. What is meant by membership operator You have it like I come here. Suppose I have someone's name. like me I write x equals to I am one of someone I will write down the name. As I suppose I would write I am Rajendra. Ok? Rajendra Singh is I will just write some names like. Ok? And I want to see inside it, what is it Is ING coming in? Ok? What do I want to see? ING. so I what should I see? Suppose I go into print I will write it down. you can also write directly yes. I write in print Yes. Ok? Inside whom? these x what x Is it ing in? if yes then return it He will give us the truth. And if it weren't so, we What would I have shown? Falls. you are from ing Anyone who is inside it can take its place Is. Like I want to write Raj. What Is there a secret inside this? He is showing us the truth. But if I write instead of this someone's Name. Like is Veer in this? Not there. So What is it showing us? Falls. Ok? so there is one of these we have one Not in. I will write not in here. That is, Veer not in x is true. correct Is. It is not there inside him. Ok? so you Here we can use in and not in operator Can be done. what does this do? Returns True If a sequence with the can say that Specified values are present in the Object. Ok? So in this way, you can And you can also use not in. This Type this out friends, next comes to us Hai punqueters. What are punqueters? it We had also seen it in tokens. of the punqueters It means basically that if we are like ourselves We end English sentences like If we do it then what do we put in it dot full stop here when you here When you're writing strings to your You are creating a list when you perform an operation if you are doing it then there are lots of You can use different types of symbols So all those symbols that you see somewhere use it in some expressions, some use in statement or program Let's use it in the structure of. to all of these We call them punqueters. Puncuators Like it can be a single quote or a double quote could be the hash we use for comments Are. You can use a slash here. You are making the title which we will see in print yes, let's use functions. you are such Let's use parents. If you are any If you are making a list then you can use Square Let's use brackets. If you are any If you are making a dictionary then you can use curly Let's use brackets. Just like that Friends you can type @ or comma or colon here then friends dot or whatever you have There are many different types of operators Whatever symbols you have, we will show you all of them I use it. So what do you have all this are they called? Punctuators. Ok? This Symbols Helps in Structuring the Code and Defining Syntax and Semantics. So this In the way friends we have just I have discussed it, it has become my token Complete. Friends, here we are now We are going to discuss bear bonds. i.e that the structure that is there when we make our Making a Full Flash Python Program If yes, then which elements do we find in it? can people use it? Like if I my I make a program, there are a lot of I will add things. lots of There will be statements, many expressions Will be. It will have indentations. in that Friends, we will have comments. in that We will have functions. so this is complete What does it make together? your one Program. And when you complete your You make a program, of that program which There is a structure, what do we call it Here? Berbs. So what is Bare Bones after all? What? Barebones means barebones refers to its fundamental components that Makes up a minimal and working Python Program. you would make a program that Which at least gets executed. So, You used a lot of things in it It is kept. Together with all of them, our A Python program is created which we what do you say? Bear Bonus. Ok? it's A simplest form of Python script That can be executed. Basically yours It is a program which we discuss here We have balls talking. Here's one I I have given an example. In this example Friends, I have posted my comments here. Are. Comments mean those statements which Will not be executed. like this line This is a sample of what you wrote Program. This line will not run. Only I can read. In the same type, this one This is a line, this also will not run. This I I can just read it. but this line In this I am creating my own function. Ok? function meaning before which you type b e f I write. Def means by definition. Then You write the name of one of your functions. You can also write your name here. Any You can write the name. But there are spaces between you No, give it. This is your function in this manner. What have you put here for this? Brackets have been installed. Small Brackets there is parenthesis you can say. After that Friends, we put a colon here. Callan after installing it i.e. after this function You can have multiple statements. When also if i execute end of code then Leave four spaces here friends After that or after leaving the tab what I want to do here I also write a statement. Now all of these all the lines inside this block You will write all this as a part of this function Will be done. That is, everything written here All the statements will be executed. When I'm going to call this line an end of code. I will call the function. So as soon as this Friends, this function will be called automatically will go up and inside this function as many There is a statement of lines, all those are executed He will do it. So its block i.e. end The block of function named off code is Pursuing you to make friends there is a colon and then when you press enter If you do this, Python will automatically go here After you are left with four species you will Gives permission to write. you are unnecessary Cannot omit indentation. after this Friends, I have written here again that I Program. means your code starts with Where will it happen from? Friends, this line from this So it won't work anyway. this is the comment as well It won't work. This call won't happen now. when we It will work only if you call it manually yourself. So The first line, friends, is this one It will work. x = 10 I have created a program In which I have put 10 in a variable named x Stored it. Then this line will work. a variable i suppose x or y whichever you want Take the name. Like it has a and b in it I have. So inside this I stored Suppose 20. Now let me check here. If If means the condition has arrived. So I said if a is > b if a is greater than b If this If the result of the condition is true then friends If true, we get some statements here If you want to execute it then put a colon Look what you can do with a colon yes you have a block okay this is yours here also what is being built a block is being built and After this, whatever statement you put here We will write when all these will run when the condition is true and if this condition is not true then Where will you go blocks with Else in Else not only in this there is a colon here also so else Whatever statements are in the block Everyone will score runs. if condition was false Is. If the condition is true, then friends, in this will come and if the condition is false then in this Will come. As many statements as you can here All the runs you write will be according to your conditions At the base. Ok? what am I doing after this hmm friends? This is the function that I have mentioned above I have created the end of code, I have posted it here I have given it to execute. Ok? so what is this Is? You have the calling of hand of code name We have called the function here has given it. Now, there are a lot of things in it that I have to explain it to you. Firstly I this I will create the code once again so you will understand what I am doing Am. I would start ideally friends Am. What will I do in this? I am just like one I create a new file. Ok? going into it Let me write some statements. As Suppose I write x = 10, y = 20. Then I write print. What prints wanna do it friends? Value of x. So I will write the message. The value of x is Ok? And that's how I have done this here The statement was ended. means that of x I will print the value here. What do I do after that, friends? = y + 20 By adding 20 to the value of y Stored back in y. in the same manner I am copy pasting this statement here. This time I will replace x with the value of y I want to print it. Ok? So The value of y is also given. now i check here what should I do? if x is > y if x is greater than y growns up. Ok? By the way it is not Because actually the value of y was 20. Then I have set its value to 40. also check I have got it done. I check if x y What to do if it is bigger than? This will automatically leave four spaces. I am here I will go there and write the print. inside it Let me write the true part. Ok? True or Whatever is the result of this condition, It is true. Ok? So I write true like this I will give it. and then I go here I want to print it. like write it down hmm x is suppose if it is then larger than this I'll write it larger than y okay so I have written a message like this, suppose you can write anything just like we did It is written here that if this condition becomes false so here I write else inside it What do I write in print when I come? I'll go and write it down suppose it's a fallacy okay There is a message and after that I go and write it then inside this y is larger suppose If you want to write something like this, you can write it yes i will also do this that x is larger and I go in and write it wise large Suppose that's all, just print the message for me Have to get it done. Ok? Once I've got this I'll code it I run. You can name it anything Are. I'll name it Demo, which We have kept it earlier also. I am trying to code this I will run it once. You will see first What happened? Print it. Now friends this I I do it on the side. And here is our code. What is the first thing we have going on? Here But the line we have written here. Once Let's see this. First put x inside x 10 is assigning. then inside y 20 is assigning. then printing this Is. So, this is line number one. line number Too this went away. Came on line number three. line It went to number four. then on line number five will come. six 7 8 this six to 7 8 its It will work as per the accordion. if the condition is true then These statements will be printed. And if this If the condition is not true, it is false then these ones The statements will be printed. Like now falls Going to do. But friends if its value I will make it 100. If you return it Let's run it and see what happened this time? 1004 True and x is larger. So here I am what did you do? Just made a block. Ok? so i just told you block Let's make it. Now we have to understand further. a code Let's create a block inside. to make blocks So you are here to say what if else is ok? Loop As you can see now, there's a while loop up front, There is a for loop. You will create functions in it You can apply it. Ok? so different places But you can create blocks. On making blocks It's called indentation. these four here What do we call it when we leave spaces? Indentation. Ok? is indented, that is That you should write leaving a space. Now these I'll tell you a little bit about things right now in my PPT I am going to tell you about this also. arm in arm Friends, here I will create a function Am. Function means you can create it anywhere Are. Before it is used. assume like This is the name of a student. I would accept Yes, someone's name is Chirag. so here I am Let me create a function like this named Chirag. Now see if there was a function named Chirag It is not there. I just wrote Chirag like that. Will this code run now? No. I run I do it. It will dissuade me. Elder brother You do not have any function named Chirag It happens. Ok? So this is not ours Near. It is also giving you this error. Now I What do I do with this? Create a function yourself I will do it. Named Chirag. we call him Before doing anything, go somewhere and write it down Can be done. But in general you can do a lot of work to improve your functions Write it at the top. So I come here Should I write it down? Chirag. Now the lamp because there is a function then by creating the function First you should write def. Def we have it is a keyword. The keyword that you saw I had created a table with the name DEF DEF in it To create a function you have the keyword also happens. jo class 12th computer science It has a major role in it. the whole of The chapter is above it. Now to get into it Later, I want to write it like this. Print Suppose this is a message inside. Ok? this is a message whatever i write I will give it. this is a sample code Am. Similar sample code or sample function. You can write whatever you want to it Are. I left it for you. So I Create a function named Chirag like this has given it. What will happen now friends? First of all This statement will not run. What will be the run? This line will work. Then it will work. then this It will work. When will this statement run friends? At last when you enter this code Will you execute it? I save it. Run I do it. you see this is a sample Function. It came last because this We are calling the statement. This How are you using the statement? Using Lamp function. so the name you put here Write according to what you have The data will come. Ok? You must have understood it? a lot of such All things happen. like we have it What is? It is a type of expression. Correct Is? All these lines that you have Whatever we have written here, yes, we call all these Statement. If you get a statement that does not run Want to get it done. For example, suppose this line You don't have to run. Just see what is written Coming to the first value of x is. Ok? So this is coming to us from the very beginning The first value of x is 100. but i want Hmm, I did not write this line. what did you think Two? Put the hash next. you run this code do. This time we will see the value of axis The line is not working. So if you are a If you do not want to run the statement then What should I write next? Hash. whatever after the hash It is written that this line will not work. Ok? This You should be absolutely sure about the thing. Now this We say comment. what happens sometimes Friends? We need multiline comments. like I want this line here too it didn't work, this didn't work either, this didn't work either Let's go. So I have to put the hash in three places Will fall. furthermore, furthermore And even beyond that. I will run. see this now All three lines will not work. Ok? But If I want that beyond these three I don't have the luxury of going to different places manually. If I have to, I can do that too. What? I am pressing single code three times. Keep in mind friends, I have single thrice. The coat is pressed. Sometimes some students do this even do. I mean, I've seen one put a single quote, then a double quote We give it. Not this. either single quote you put it three times or double quote you can put it three times Two. If you have used double quote three times then You will have to close it, otherwise your down By then the entire code will be commented out. Correct Is? So right now you just have these three lines. This is a comment. That means these three lines are yours right now There will be no runs. You will see runs this time too It is not happening. Ok? then the comments say They have it. Now these are the things we need to know I have to understand. Once, just theoretically, you Let me explain all these things again. So See what we are seeing here? Main Elements of Python Programs. what-what does it happen friends? Expression first. Like what happens? Here we can say Combine symbols to produce a value. like 3 + 5 a + 9 whatever you are writing in this What can we tell everyone? Expression. What will the expression give in general? It will give the result. In this generally we use operator. Like it can be 3 + 5 + 2. write it like this also Can be done. x > y is also a There are expressions. What will be its result? Either it will come true or it will come false to you. So, together they will give you a result You give it. Generally in this we use operators We do. whether it is an arithmetic operator, Whether it is a relational operator or any other operator Too. Then whatever lines we write Inside your Python code, you can execute Apart from comments, all the executions will be done If so, what do we say to them? Instructables. What do we do with these instructions Can you say it? Actions such as the print function Or if all this happens. what do we to them Do you say anything? Statements. Statements Meaning Those lines will be our runs. all of them Commands. All those statements that There will be runs. After that come the comments. What are comments? There are notes Basically for readers. this is for us Ignored by Python Python ignores this It will give you and your reading skills will improve Meaning, we can say understanding of Python There is some improvement of yours in this. Ok? So I'll show you here Am. Like now we can see the code of Python they were just staying there. If I'm here inside it with my Inside the code, I press Control O. yes once. Ok? This was the file that inside i want this statement your run No, or what is this function doing? So I can write the hash here. is this function ok? is a demo. I am like that I write. This line will not be your run. Bus You have to see this. Ok? this one line There will be no runs. Who is it for? Bus for readings. You can understand the program well To understand. If you want to give any notes to the reader want the reader of this program, to the developer. Suppose I wrote this code and If I share this code with you. I will share it with you on WhatsApp or somewhere else. So, you should know that here Why did I write it? This means that if I It is written in it that what will happen with this code now will be? So I can mention it like this above Yes, I am making comments. After that comes the Indentation. What is indentation? Four There are spaces and there are tabs which Through this you define any of your blocks Are. After that come the functions. Functions what happen? There are reusable codes. That means you can run it as many times as you want. Can be done. Like I did here once I had to write this code. if i wanted to Yes, I have to write this line again and again. So Whenever you want to write these lines you can come go here and write it then it will work then this I called the function named chirag twice did you make it once okay once you You have created the code and you can use it 10 times or 20 times You can use it as many times as you need Can be done. Now what is this? a simple one We had it. But if any There would be a complicated statement, It is a complex program, once it is made Would give. We repeatedly call him directly by his name You can also call him directly. so that We need to write statements again and again It doesn't happen when we create any functions Are. Ok? So all of these things You must have understood it. I gave these a little more It has been explained. what are expressions it occurs? An expression is any combination of values variables operators and functions calls that produce a result of Evaluates to a value such as 5 + 3 x * 10 hello plus world inside it lane a b c this What will return you? Three. Ok? a How many characters are b and c? x is > y is Everything will produce a result somewhere I do it and give it to you. Hence all these expressions They are called. then it comes to us Statements. what do the statements mean Did it go to you? instructions which our Python's interpreter which can be executed Can. Ok? That is, any statements When we write, we have some work to do It definitely happens. The actions would be performed by us Are. like assigning a value, something like Displaying the value by printing or then using if else and then using while We can control the flow of our program. Can be done. Like here are the examples. x = 5 So these are assignment statements. if I am printing x then the expression There are statements. if x > 0 this conditional There are statements. After this it comes to you Comments which you can also call documentation Can be done. What is a comment? comment in Python is a line of text that isn't Executed. this line in your Python It won't work. Python's interpreter in is not going to execute the lines. Comments are used to explain the code. If You might want to explain your code. So why did I write the code that I wrote? Is? Why did you write it? if that thing I am going to try to improve his readability. I want to write so that those who are Are there other developers or am I on my own? When I write a complex program So for myself I write comments there I will give it. So this helps you. Understand what the code is doing. Code Help you in telling what is happening He does. You have two types of comments There are. One is a single line comment, One is a multiline comment. Joe Single A line comment begins with a hash and the multiline comment has triple You can enter codes up to three times in a single Or you can also use double codes here Can be used three times. in the same type Friends, next comes to us Functions. What are functions? More It is not necessary to know. this is just in our book Just a small part of our syllabus This is an introduction. What are functions? in Python is a block of reusable code that Performs a specific task. which does some work It is used to get the work done. You The code which is written in it, you can use that code Can use it again. So reusable code you have it which contains a block of codes Are. You can write multiple statements in it You can use them again and again. like right now We created a function called Chirag. It allows you to organize your code by Through this you organize your code. Avoid repetition. You can use those codes again and again call that code once instead of writing If you give then all those statements of yours Will be executed. and make it Modular and manageable. You can compile your code into You can manage it easily. like end of chord did we just see the example of the name or I also created a function called Chirag I have told you. then comes friends You have block end indentation. Four You leave spaces. I told you If you press enter after putting the colon then Four species are automatically left out. Correct Is? We call this indentation. That It will be a part of the block. As soon as you see those You will move four spaces behind your Starts running in the normal flow of the program It will be done. So what is a block? A Block which you also call a code block here, They also say suit. then a block is a group of statement under another statement and Functions. Ok? Like If Else, Like You can create loops just like you would create functions Are. The same indentation is used for define Block. You can use indentation to create blocks I use it. four spaces you are here Let's apply it. Statement with the Same Indentation Belongs to the same block. If you here It is written if and after that what you have written here You also have to write all this leaving four spaces All the parts of will be of this if only. Statement needed a block must and with the Colon. Whatever you say at the end of this statement You are making a block and at the end of it you It is compulsory to have this colon only then you are here But this block will be formed. After that it is unnecessary indentation which if you apply then you will have An error will come. Meaning you were writing print. you wrote print and then you went here I wrote it and printed it. So guys, this is an error Is. You cannot indent anything that is unnecessary Are. Ok? correct with this type There are examples of indentation. all the things I told you. By the way start with statement Ending of colon. Ok? So a statement It will take a colon for you. Like if is, is, is, wild, in all these we call it I use it. Intent Follows Line Consistently. So, here you can see Use Spaces and Tabs Do Not Mix. you are here But you can press tab or press four spaces. Maintain block integrity. What will happen with this? If you are unnecessarily here If you put indentation then because of that your There will definitely be an error. I hope friends You must have understood what a block is. You must have understood the indentation and Other topics related to Joe Barebone or there are contents as commented, Expressions are done, statements are done You have understood all this very well Will be. Friends, now I am going to tell you I am going to tell you about variables and assignment About this. what are variables after all Is? How do we create those variables We do? How do we assign that? when inside variables that is when our Value is stored in our computers inside the memory so how can we give it a name Let's give you multiple variables, how do we do that? You can create it along with your friends Here we have many types of IDs Discussion on all small topics do. Here, first of all, we talk about Let us see, what are variables after all? So Friends, whenever we forget our values Stores any type of value As you can see in this example I have stored 10 so whenever friends i will store 10 in memory So I will give it a name and that name will be What if I have x so that it never gets into memory also I can access this value easily Am. Similarly friends if I go here What would happen if I wrote y = 20? In memory It would go somewhere and get a store for 20 rupees What name should I give it? y this is the name Friends, what do we have? There are references. Basically we have a We can call it a reference of type. Labels Say through which we can inculcate these values You can access it again. What will happen now? like if I tell you here I Stored 10 inside x. so what will happen Friends? 10 Stored somewhere in memory Happened. Suppose it has an address. Values such as Here is its address 9 87 suppose 5 982 like this You have some number. So on this number What did we store? 10. This is the number that Those friends we have an address of RAM Is. Your number may be even bigger than this. Ok? So I assumed suppose this is a number. We stored 10 on this number. Now In memory, like we have 8 GB of RAM There is RAM. So 8 GB can hold a lot of data. Can. So we have somewhere around 10 stores in that I did it. His location was found. Now we have so much Big adders are not to be missed. what to us Do you want to remember friends? make a label for it What do we call the person who gives it? Variable. Like where there is 10 you can choose the one you want You can use this ID also. his address You can use it also. But we our people To make work easier, we have used this ID what do you use instead of using it Friends? A label here. this label we What are you saying here? References or Us What can people say? Name. so basically You have a name. anywhere you are When you store any value inside the memory If you do, then whatever name you give it What do we call him, friends? Variables. Like in this example you We will see that x = 10. name equals to s for It is Suren. So what is x and name you have? is variables. and here on 10 and s What is Suren? We have a value that Inside these variables we have assigned. If we talk about assignments in the same way How can we do it? So assignments We use it for what happens Friends, equal operator. Equals To Operator We will use it. Like it is written here a = 5 so we have an integer inside it The assignment is done. The value is assigned Which is of numeric type. That is how we Made b = 3.14. This means that we have a Stores a value of float type. This way Hi friends, c = hello is written. So we have A string is stored inside it. So the variables get created and assigned The value on the right side of equals two. Like if I write x = 10 then 10 is what it is will go to x. if I write 10 = x What does that mean we have here? There is a type error. take care here But the name of the variables is always on the left side will come and the value on the right side will be Always in variables on the left side It is assigned. Ok? In the same way we People will talk if we get multiple If we have to create variables then we can write it like this can x y z. So what will happen with this? Our We can store any value in it Can. Like what is happening in this case? We have x y z a variable named x. A variable named y will be created. a to z name A variable will be created. Our One Store inside x It is happening. Friends in y our two store It is happening. and we have three stores in z Used to be. We can also call it like this. Like I could go and write it here Am. Suppose a = b = c. Ok? write it like this also I can. Equate supposes five. in this case What will happen friends? somewhere near us There will be a five store. Let us give him a name will give a. Be careful friends when you are here We will create variables in this case like this The five stores in the case are at the same location We have named it A, B and C Also kept. If I access A via Still it will come. If I access it through B then Even if it comes and I do it through C, it will also be the same You will get the result. Meaning where there are fives We have given the names of three of them. but if You would write it the way I would here x is x or the name of the variable You can also have beans. a b c = 5 10 15 So what's happening in this case? somewhere at It is becoming a five store, it is named as such, There are 10 stores somewhere, named B Yes, there are 15 stores somewhere. You It has been named C. In the same way we People can see some rules. when we the people When you create your own variables, make some rules for them also occur. What are the rules to look at Are. First of all it can contain letters, Visits and Underscopes. Ok? That means that When we create variables, we first Saw it in Litterals too. what are the letters We have seen it in tokens. So In that I told you about keywords Just later there was the identifier. all the same There are rules here. so here we can say which are the letters, which we have are the digits and only those underscores should be used Can be done. other than this no other special We cannot use symbols. What is the first character you will have? It is possible? either there will be some alphabets You can have any underscore or Is. After that can't start with digits. You can't start with a digit. Case It will be sensitive. means capital x and here small x which you have both are separate Will be. and avoid using Python keywords which Python has keywords like if, He's vile, he's classy. You have a lot of such Have seen the keywords. So that's you as a We will not use variable names. here at Variable name x is valid friends Underscore one underscore temp all will work. But all these are invalid. like first Because Forest is coming forward. in the same type class class you have reserved words Is. here you will see and user dash name dash I can't come. the underscore of come to you Can. This is how we talk friends We will do it regarding dynamic typing. Dynamic typing means that when you When we create variables then Friends, maybe the first integer store Do it. Like in this case you will see in x What did we store first? 100. So What type is the value of x right now? Integer. Going further, if you find the inside of x If you want to add a string then you can do this Are. Now here your variables were Its type has changed. so which Old programming languages like C in C++ or in Java friends you don't do this Could have done it. You need to specify the variables first It used to be like integer C so now you can write integer named C You can store integer values in a variable Can be done. Can't even store 5.5 inside C Can. You can also store capital A inside C Couldn't do it. Ok? So this means that It happened that whatever you are here, Can store type of data. When you are creating variables you can change any type of data can be entered and later If you want to change it you can easily do it Are. So Python is dynamically typed meaning You do not need to declare the type of Variable. The type is what you have. There is basically no requirement to tell you Is. Now here we will talk about static Typing. static typing is what we The pass was in C and C++. as I to you was saying that first we have to find the integer x = 10 I had to write it. After that, we mean people who You will first create the variables and then type them I will tell you that these are my variables Will only store integer type values And then you can also add integer type value in it Could store it. in case if you have I'm going to store hello inside that x here If you try then an error will come. Because You had said that we are intis inside this Will store values of integer type. But Now we're going to put the string in here. So What will happen to this? We have an error. Ok? So here we can say Unlike Python Dynamic Typing C and C++ whichever one uses static typing Was. which means in C and C++ variables Type must be declared. you first The type of the variables had to be declared And you have to store values of the same type It used to happen. But in Python you can do any Type data and change it as many times as you want Can do it. Now we will see how our What is the type of the variables you have? So for this we have a function which The name is type. You can do this through type functions. you can see what type of we have There is data. infact you are running a function here type and I'll show you another function I'm going to tell you friends, his name is ID. Ok? We do this practically Let's see. I am here once ideally Let me start. We will start Python We give it. And by going inside it I become a new I will take the file. Ok? And we this Let's save it. with the same old name Like I can save it with the name demo. I will give it. I'll go and write it to you friends x = 10. What will I do after that? Let me print x. Ok? Its After I will print friends id id of X okay what is the address of X and I will write here along with print type of X inside this so our type of X What are the three things I am writing about? Friends, I save you and run you You will see that the tag is coming first, then this is coming this is your address and then comes his type which is integer if friends I okay inside the X here go to the 10 spot Let me write a string like: I'll go ahead and write S for swing okay it is of this type so what have we done in it now The store has been stored here friends We have stored the string. Ok? I I will save this. I will run it again. You We will see S for Sure, what is its address? Is? 11 2 is coming to you. and here The string is coming to you. Ok? This If you close it and type something else, If you want to add it, you can do that too Are. Like I'm going to go inside it this time I will store it. 8.5 you will see this time The data we store inside it is We did it in float type and our address is also Continuity is changing here. Ok? so one is x, one is we have the id here and we have a is the type of x. so what did we do Friends? What are we printing with this People? Only value. Ok? so I write I will give you the value of x. what do we have this Is? The value of x is. Ok? in this manner You simply write x. what do you get from this Will you go? Address of x. Ok? by this type We will get his address here. From a function named id. and if you are here If you want to see the type, write the type of x I will give it here. In this way, we its address, type and this value of all three All three things will be visible. I Hope Friends, you must have understood this. Correct Is? What is all you need to do? an id from address, type so that the type and normally when When you type x or the name of a variable it becomes You can choose the type or the value or the address If you want to see, you can see. Ok? These There was an example. I hope you understand this too You might have noticed that when you type something inside Python If you want to see the type of data, then select it There is a built in function for this called type function. They You can use it. The example is here as well And I have shown it to you too. Friends Now I'm going to tell you here the input And about the output. That means Python When we do programming in how can we take input from the user and How do we get that data or any data can be displayed again. If we want input from folks So, I want a program like that in which my user enters his values. So what do I need the user to do? Input will have to take. Suppose I make a program Am. I am giving you an option in that that you enter your username and password there Write. So friends, what do I have for you Will I do it? In my code I will write an input Function. In the input function I will send a message I will put it. Like I will write enter your name. When you run the program there will be You will see written 'Enter your name'. Then You will type in your name. So I my To take input from the user in a program I am using a function here. that is Input. Ok? What is his name? is the input function. what works Friends? So that's the job of taking input from the user. He does. As an example, the input is function and inside it you will write a message. Like it is written in it enter value. I am here But I can write enter your name, enter your Password, Enter your email, Enter your Contact number. You can send any message like this Can be done. and if you want any data To display what we do on our console I want to get it displayed on pay. We output If you want to send something, print it If you want, then for this, friends, we Let's use the print function here. What does the print function do friends? That displays our output. As In the print function we have added the message here it is printed hello. So this is what we are You will see these Python input allowances: Program to take user data and output Displays information to the user. Ok? these two There is a function. Perform both these functions well We have to understand it because on its base we have many All questions can be asked. so here we are People will first look at the input. How can we get the input? then the Input function What is the name of the function itself? Input. Input functions allow the user to Enter data from the keyboard. you can use the keyboard You can type anything. Right now I this I will show you now. After this, friends, we what do people do? Writes the input Function. after input function you saw There must be brackets here. and its Please send us any received message in between Can be done. like enter your name, enter your If you need to send an email or any other message Is. Now when this message will come in front of you. The output of this value which you will see If it comes in front of you, it will be written there Look at the message like we have written in this one what is written friends input ok input what have you written after enter your name Enter your name will appear at the top of the screen Only after that friends I will go here I suppose I write my name, so I I have gone here and written it just like Surendran Friends, I will type Surendra and press enter so this is my string okay my string will go this way In variables, that is, the variable named name I stored the data in so here is a is a variable. Message display of your print will be. Whatever data the user enters, that data From here onwards the store will be like this in the variable. will take care of a big thing that the input function is The type of data it takes by default is yours What do you pass? Always string. even though guys we're putting fives here or Then we are putting 5.5. means I say if you're writing an integer, if You are writing float here, any You are entering data of type . This data is yours Will go. In which form? always here will be taken as a string. to this thing You have to be careful. if by the way you If you want to store the file then you have to click here You have to use a function INT So that you can convert it. If If you want to store a float then use float We can use the function named. so I I will tell you further now but I will just tell you What I am trying to say is that the input function what is its default type? String. Now here we look at the type Convert with input function. So by default What does our input function do? Is? Returns data as a string. this thing Friends I am telling you this is very It is very important. Whenever any of your There will be a test in which you will definitely have this question You will be asked what the return value of the input function is What is type? contains a string. then use type convert to convert the Input. Whatever your input function is Integer or float or anything else If you want to convert then according to that you You can use functions here. As I write here at Store Inside Edge I have to do my age. Suppose I'm my I'll put the edge here. Assume any We have to put an edge on anyone. like me If I enter a number, 15, what is 15? We have an integer number. So integer What are we doing because we have numbers? This Enter the entire line i.e. input your age What have we done to this entire line? I nt is passed inside the function. So when This input function will return 15. What is it will he return? 15. But how does it do that Friends? in the string. then that string What will he replace it with after removing it? Integer Who will turn into me, friends? IAT Function. If you want float number like suppose we People are price or weight. You can choose any number Want to put it. like suppose i write I want 50.75 here so this number What is this that you have? Float. so here But what function should we use, friends? Use a function called float. I to this Let me show you something practically. Ok? so what do i do here Friends? I will start my python. Now In Python I create my new file here I create it and save it I will give it. You can save it with any name. Can be done. I will demo it like always I will save it by name only. now over here What do I do, friends? a function We have a screen. Although we Have used it many times before. So its Inside double quotes I want to write a message I want to write. like I want to write Here is the sample program. Ok? I wrote a sample program. Save once I do it. I'll press F5. I am running. The sample program is written. Now I this I want it to ask me to enter Your name. So if I am a developer because if I look then what am I here Will I write to you friends? I will use the function Input. and because the developer wants that The user should enter some value in it. So first we what needs to be done? Even if you take a message It will have to be Isn't it? If I send him a message If I display it then he will enter the value. Now! What have I done? Only the input is written. I will save this. by running you We will see. My program right now friends It has not been terminated. Ok? but he The cursor is waiting for you to type something. I wrote something like that. Ok? But There was nothing written further there. because we have added some value inside the input function Didn't even write it. so what does the input function do Is? Generally reads. Now by reading First if we want the value to be there store there we want someone to If you get the message generated then you can write the message. and whatever value I am putting in this If I need to store the value somewhere in some variable so I need to change this here You will also need to name the variable first. As Let me write the age here. Ok? So edge equal to input and what goes inside it I am writing here Enter Your Age. Correct Is? So now let me save this and After that I run it. So it is simple I wrote 18, 18 is going to the store. But friends how is this 18 going as a string if we want to check So I told you earlier that we print You can go inside and type Of edge. Ok? If I want to see this hmm what is the type of age? so show you will give. For example, suppose I wrote five. what is it showing? There is a string. So we I don't want this to be a string because We have to do some calculations at this age Can. For example, suppose after 2 years, Whatever age the student is entering How old will he be? so here I am I wanted to write something simple in print What do I want to write? Any age plus two If I write it now, suppose I will run it I do it. If you see it then I suppose I will write six. After that to me this what will he do? It will also show an error. Why is it showing? because i am a string and inside the string I have to add two I want. So it is not possible. Friends, What do I need to do here? This whole I will have to write this line in I.N.T.K. Inside. so that this is my string What will the string be converted back to? In integer. If I check its tag now If I do this then what will I get written here But? INT and here whatever he gives me I will enter the number and add two to it and I will He will show it also. Let's see. I wrote 15 So after 15 it will also tell its type me and also add two to it and get 17 He is displaying me. Meaning, I have Bar has been converted to an integer. understand this I must have come. friends if we are here But I want you to show me three or four things. I will give it. If suppose I want to float Am. Ok? I do one thing. First By converting this once to float, you get I will show you. now in float I am here I am taking it. Suppose it is like this anyway we We will not put numbers in points in age. Let me give you an example like this: 6.5 so what? is it showing? 8.5 and what does it type Are you having it? Float. Ok? Now what am I do I? if a good program is made If I want to see what I write Friends? Here, for example, x = int. Correct Is? And I go inside it and write it here Input on . Ok? What will I write? input and I go in and write enter a Number in x. Ok? In this manner. Watch Now You always have to put a colon here Space should be given. Otherwise what will happen? It will come completely stuck. Like I tell you I will show you now. If you write this much If you run it, the data will come in x. Ok? And I then suppose I also want to print x I want. Ok? So let's do one thing. We can see how ugly it looks Is. It comes stuck right next to the x. I typed in a number and he went The store is being stored. Look here how much scruffy looking. Ok? so what do I Should it be done? here when I am taking input so let me put a colon here. A space should also be taken. So I took up space. Then a colon, then a space. if the same code I run again. You will see this bar looks good enter number in x then space colon and now my control is this The cursor is there, it's waiting here. Now I'm typing here so good the way it looks like there is a Our value is being stored. so you Please keep these things in mind a little. try to do that which is the first character You should keep it capital. not full capital Do it. What do all students generally do? Are? You could have made the first character small as well Are. So if you make it small, would the output be dirty? Seems like If you think like a developer, Think like a programmer and the output is yours One should always come in good shape. then the input The message that you are giving is also yours I can give you one well. in the same type as I take some numbers in x and y. Ok? So I'm sending a message here was for x. This time I am giving y's For. I take two numbers x and y. Now I suppose here I wanted z = x + y So what did I do, friends? of x and y The value is stored in z. And then I look here now I print I will tell you further now. I am here a I want to post a message. inside double quotes What should I write, friends? I go and write Sum of x and y is. what is happening in this case is it friends? this is just a message from me It is being displayed. Ok? so here I am But what am I writing after going there? sum of x and y is. now what do i do after this Friends? I will put a comma here. Comma After applying it I will write z. So I what have you done here? two different values passed to functions i.e. print to the function. one containing the variable and the other Inside which there is a message. then you comma By separating you can add as many strings or Variables can be passed here. I this Let me save the code once. I will run. First number friends I am 50 and second number I'll put 60 here. You will see both The sum is 110 and it is in front of us It is also being displayed. So here we have what did you do simply? I took the input and tried it. If we want some more input here Get it done. Like I write the supposed name. Ok? name equals to what should i write Friends? Input. we do not convert this have to do it because there is string. so I write Let me give it to you, enter your name here. Ok? In this manner. same type if you want Suppose if I need to get someone's address then I I'll write address equals two and then I should write this line once I will give you the input. And I go inside it I will pass on the message. and I'll give this one more time I copy it because I need it again and again You may have to use it. I write it in Enter your email. Ok? Just like that I had a When you send the message, he should enter his email ID He will give it here. and after this if friends I want to read suppose phone number here. So in phone numbers, don't we do calculations? Do. Generally students have a doubt What type of phone number should we keep? is an integer. If you find any mistake in the phone number Calculations have to be done. like my phone number Plus your phone number equals what phone does the number form? We don’t do this. This is senseless talk. So what will we do? What type of phone number will you take here? Friends? Here, simple string type is used We will not install INT further. so I write Let me enter your contact. Ok? Contact number. In this way, the user can will enter the contact number. If we want to Now taking its age, taking its weight, then we You can also take it. Ok? what i write Give? After this, which one should I pass? Will it need? Inside the IAT. So I.N.T. I am using functions here. So I go and write the input in it. write I will press enter. Ok? Enter Your Edge. Suppose You have to pick a number like this. So this Where will you store whatever you take? Will you give it? then you can name a variable Are. Like I write edge equals Two. Now if you print all these values If you have to do it then what will you write friends? Here But you can write name comma address. Ok? You can take it from this type. comma phone number Comma edge. You can write in this manner. One Let me show you how to operate it. It will look dirty. But you will understand something I write down things like names. somebody's name it was Rahul his email id was Rahul@ okay suppose gmail.com same way his contact The number is 9876543210 and after that his age is suppose Here I will make his age 15 years. Now see, all the data has come together. If this same If I put this same thing in different lines I write like I have written here. Correct Is? If I write it like this: print and I copy paste this. four times if I print it then what will it do Friends? It will print the name first. His After that it will automatically give a new line. Meaning What does the print function do? Display After doing this your cursor will be automatically redirected to the new Sends it on line. You can understand that like this your cursor display from print means your After the content is displayed the cursor It automatically comes to a new line. So I'll write my name here this time. Address. I go here and write it down Suppose PNO and I go here and write I'll give you whatever variables I've taken Such as Edge. I will run this same thing again I will show you by doing it. Like Rahul this time I will go and write here like this Rahul@ Suppose gmail.com then contact number whatever it is 9876543210 And i put its age here. You will see everyone coming to see you in different ways is getting it. So this means that You have variety within prints as well. Can I change this? Isn't it? I I want it not to come in a new line. These Comes with tab. So let's try this We people. What am I saying this again I will close it. What do I do this time Friends? After going to the end here I I will go here and write E N D AND equals two and what am I doing here this time shall I take it friends? I'll put it once Hash. Ok? What am I writing? End Equals to#sh. If I mention the same thing here I will try it as well. the same thing if I I will try it here as well as here Where ever you wish. I am rewriting this code I run. What should I write this time? Name like Rahul. Ok? Emails such as
[email protected] ok. in the same type Contact Number 9876543210 and i put the age as 15. You We will see that this time he sticks to it after Rahul It did not happen. What came in between? Hash. Here by default you have slash n It happens. That means a new line appears. If If you write print then what can we do Gave? We don't need a newline at the end. What do we need, friends? Need hash. I put the hash here, here too applied it, applied it here also and the last one I also applied hash. as soon as a new line comes yes, we don't need a new line, what do we need Needed? Need hash. So, what did I say here Did you apply it friends? Hash. if you are here I don't want to use hash, by default What happens? The slash is n. Backslash N. What does backslash n mean? I Let me run it once and show you. As Suppose I write some data like this I will give it. Ok? Any contact number and I write anything, whatever my age. You You will see here whatever name you have like Rahul R I wrote bye here The default newline is slash n. After that whatever data you have with the #sh hash So what happens by default friends? The slash is n. Instead, you want What? Dash here to take what you want Placement What you want in the end You can put it. infact if you do nothing If you want, you can keep it empty also. If you look at it this time, it will stick to you It will happen as it happens. Suppose, I write I am Rahul. Ok? this way and this time I will write to you
[email protected] if you I wish he hadn't joined New Line Rahul stuck to him and went with him so I I am telling you in one. What number was it? I'll just put a number here And I add the edge. You will see Rahul and
[email protected] no space between Not there. Why not? Because we have There is no space kept here. we have neither I put a new line, neither # nor a space. If you keep space, space will come to you. Correct Is? So what did I tell you one? one end side by side in print function Friends, we also have a separator. What else is a separator? I'll give you a I will tell you once again. like here We had written the name. what after that I want to write the address here. Ok? After this I wanted to write here phone number and then I wanted to get Edge. did you just see this line Was. I will show you by running again I am with you. This time I name it Like Rahul again Rahul @ suppose that gmail.com after that I contact you here I will enter the number. Ok? that's the thing I I am using it again and again. you will see good The space that I used here, I aged it The spelling is wrong. Ok? So this the way when you run this code. Correct Is? So I will write it again like Rahul@ are you ok? like anything like this gmail whatever you want gmail.com and this is how we are here I wanted to see any contact number You can take it whatever you want and whatever age you want Now let's see what happens here. data is coming okay here we have space I haven't kept it but what is it doing together I am giving you space in the separator So I did not tell him to give me space here I did not say give space here either but he did not even say give me space, so this what did you do by default separator which would have been doesn't it give you space if you want it you want a separator like i just used Did. If I want SP here equals to this time in the separator I'm here But I am using a particular character Such as pipes. Ok? the pipe before this pipe After that you have to give the space which you want to give can give. I will save this code this time. I do it. Let me tell you another thing. one i I told you one more thing, I am telling you SP. I run this code. This time its I will write the name inside. Like I wrote Diya tash. I write it here
[email protected] Ok? After this, I write like any such number and after that Let me put his age. You will see the frost After Tushar, Space Pipe Space is coming. space pipe space is coming here too and You are getting it here also. So the Separator What does it do? two different things that you There are strings. Ok? which are the values in the print function you have it in the middle It gives it to you with a separator attached. As Right now in this case, we have used it here. Ok? Space pipe space. So I've given you I told you two things. I hope you understood will be. I will do this once. Closed Hum I came back here. I told you this Given age and price. Ok? by this type We looked at integers and floats. After that it is Output to you. what do we do for output are you using it? Print Frontshing. Here but we'll see inside the print the value one, value to, separator, add all these things we You can add it here. was in the example hello world like name suran whatever you take Whether multiple strings and you You can also pass expressions. Its The result will come to you 50. In the same way we People, look here, how can we control it? There is an ending. So, what can we do for that Can you? what is the default ending We have? slash n that I've already explained. You want to replace the slash n with something else So you can pass that inside the end. As you can see in the example, I It is written here that it is empty so you have it any inside new line is fine you have it means it will not give slash end at the end which you have you have also written hello that is your cursor weight he must be doing this and if we see then we will Here you can see what happens inside the ending We can also use a separator here. You can also do the end. By default you have There is space. The separator I just gave you I had also told you after installing the pipe and if you If you want to see it in New Line then go there You have slash n by default. So we had this like hello world Is. But what do we put in the separator? What did we put in dash and end? Pipe. So What will be this output? Hello World. between We have a separator in it. and at the end What do we have coming up? This is okay? You can use exclamation symbols. I Hope friends, you understand all these things well You must have understood it. Now here we see When we take people's inputs, many What is a bar? Some errors occur. how are you coming friends? like i write It was an integer. I wrote in integer incude and I go inside it and write Tha Enter Your Age. Ok? Now I have to write to you It was 15. But I am here to show her instead of 15 I am writing the spelling. Ok? accept it I should have written five here. So I am five I am writing the spelling of. So this is yours It will become a string. Like let's say I am five I will take it only. so this is your string Went. This will convert this string to IAT. Can not change it. What will come? Error. It is possible You should convert it to float. For the float You wrote suppose 5.5 was correct. but 5.5.5 If I wrote it, I put two points by mistake So what will happen, friends? error will come near you. So you may have some such issues Can be done. You will see it in this type only. First There is a type mismatch. What is type mismatch? Entering Float When an Integer Is Expected. If you are being asked for an integer yes, if you put a float then there can be an issue Is. You typed a string of a number If you put a string in place then you will have issues It is possible In you have an incorrect float It is possible As 73.0.0 In this case also what do you have It is possible? Errors may occur. after that we We will talk about some common escape sequences which that I just told you. the most Friends, we use slash n. What does slush n do? New line your Comes closer. There is also a slash tee of the same type which is like my cursor is here x second I want this much space between y So I'm going to use slash t. From Slash Tea What happens? The tab appears. in the same type If you want to display slash like c colon slash a b c what does this mean to us do you want to do it friends? Have to display it. So Give us a slash to display Bar you will have to put a slash here. Ok? If you want, just write it like this Someone's house is named Ram's House. Ok? I want to write Ram's Home so this in case my string starts here because the string starts with a single quote it occurs. It ends on a single quote. But in the middle we have another single quote here Have put. so it ends here will go. So if you see a single quote in the middle If you see a single quote in between If you want to display then you need to do slash single Will have to wear a coat. or else out By using double quote you can simply put single inside You can use a coat. If you have outside There are double quotes and inside also you have double quotes If you want then friends what will you have to apply? You will have to use slash double quotes. So all this In the category of escape sequences you have coming. And along with that, here I have given you This has also been mentioned in an example. Ok? So you must have understood everything. I Hope Friends, you will completely like this chapter. You must have understood from this. try your best To explain it to you practically. So this This chapter is almost over Is. What is your next step? I can give you some practice tips. So what should you do friends, try You can do programming. Ok? This There was a lot more to the chapter though No, for practice. Next Joe You have the chapters in chapter number four If you go there you will see many You will have practical based questions for yourself. Will pass. So you can see that. Its Apart from this you can also see some other questions Can be done. You must practice. Correct Is? You are getting errors by handling them See. What issues are you having Are. You can expand the outputs further to see Can be done. As we have just seen, address, phone number, email you and also your You can do it accordingly. from little to little You can make programs and see them. Input You will understand the output clearly. To all More important friends in this chapter This is tokens and input output. Ok? So I hope friends everything is clear Must be. So today in this video we are going to We will see it soon. We have covered the complete chapter It has been kept. That's all we'll do today, friends. We will meet again in our next video Another new chapter with a new topic. If Friends if you like the videos then please like Do it and if possible with your friends Please share this so that we can get People should continue getting more motivation. then see you Hey guys we are in our next video. Till then stay connected with me. Thank you.