Python Full Course 2026 | Python For Beginners | Python Basics For Beginners 2026 | Simplilearn
Key Takeaways
This video teaches Python basics, including data types, functions, loops, and object-oriented programming, for beginners
Full Transcript
Hey everyone, welcome to this course on Python fundamentals by simply learn. Ever wondered why learning Python is a game changer in the tech world? From building simple programs to unlocking powerful machine learning models, Python is the key. [snorts] If you're serious about coding, mastering Python basics is absolutely essential. In this video, we have got you covered step by step. Whether you're a beginner or just need a refresher, this video will give you the strong foundation you need to excel. Here's what we'll be covering in today's session. First, we are going to dive into Python programming basics. Now, this includes the building blocks of Python, which is variables, how to use the print function, and how to handle string manipulation. Then, we'll also explore data types, data ranges, scientific notation, and the math module. all the tools you will need to work with numbers and text in Python. After that, we will explore Python operators where you will get a full breakdown of arithmetic comparison, logical, and membership operators. We'll also talk about the operator precedence with the famous PEMDIUS rule, the backbone of how Python evaluates operations. And trust me, mastering this will make your code run smoother than ever. Then we'll move on to control structures and loops where we will break down how the if else conditions work and how to make your code repeat actions using loops. Now this is a gamecher for automating your logic and task. Plus we will touch on data handling and formatting and how type casting can help you convert data from one type to another effortlessly. And lastly we will talk about the oops concept which is one of the most exciting parts of Python. We will cover variable scope, access, inheritance and its type as well as polymorphism and method overriding. Now this will help you write more organized, reusable and scalable code. Now before we dive into here's a quick information for you. If you're interested in mastering the future of technology, then the professional certificate course in generative AI and machine learning is the perfect opportunity for you. This is offered in collaboration with the ENIC Academy IT Kpur and it's an 11-month live interactive program providing you hands-on expertise in cutting edge areas like generative AI, machine learning and tools like Chad GPT, Dari 2 and Hugging Face. You'll also gain practical experience through 15 plus projects, integrated labs and live master classes delivered by esteemed IT Kpur faculty. Alongside you will earn a prestigious certificate from IT Kpur where you will receive official Microsoft badges for Azure AI courses and career support through Simply Learn's job assist program. So what are you waiting for? Hurry up and enroll now. You can find the course link below. Now before we get started, here's a quick quiz question for you. The question is which of the following is not a valid Python data type? Your options are int, float, car or string. Let me know your answers in the comment section below. So the very first notebook talks very very basic things about what are variables, how to use them, how to print, how to get get an input. Okay. And then very basic programming. So I plan to uh go ahead finishing with the notebook number one and the notebook number two with all of you. Don't worry I would be sharing both the notebooks with all of you. So don't worry on that. In fact, I will share my entire drive link with you. Forget one or two notebooks. I'll share the entire drive link with you. You'll have access to all the six notebooks which I plan to do in three sessions. The sessions are also very few. No, we just have three sessions. 1, two, and three. Today, one, tomorrow, and a day after tomorrow. So, I'm saving on time instead of calling everyone on audio and getting introduced. Hence, we got this Google form filled up, right? So we're trying to actually save time there so that I can devote more time in the teaching learning process. You see right? So this is a this is another notebook which talks about a few more uh uh things and exposes us to a few more types of uh functions and built-in variables you see and it has few more programs here. Okay. Now friends, I tell you one thing very honestly, it is immaterial whether you program inn net or in java. Uh python programming compared to other languages trust me is easier. You see it is easier. The learning curve of python is shorter compared to net compared to java compared to react. So if anyone of you is working in web development or in Java development, you will have a bigger and longer learning curve. Learning curve is here is much shorter. You know where you very quickly you yourself will feel that uh you know you will feel that you are with Rocky or with any other good trainer you just took about 3 to four hours and you came in sync you see. So that is what is going you're going to experience. So that's not because of that we are training you good. The idea is that the language is easy. We know that Python is a high level language and all programming languages which are high level it becomes easy for us to code because we code English-like. Be it Java, be it JavaScript, be it Python, we write English statements, we use English words. So it's an highle language. Of course, the language was created way back in 1980s, but it has become popular in the last 10-15 years a lot because Python is being heavily used for lot of machine learning, deep learning, NLP, CV work. So therefore, it's become more popular. There are a lot of idees which that means integrated development environments which we can use for running our Python code. So we can use PyCharm to run our Python code but I don't advise this because as you progress ahead you're not going to do too much of Python coding you are going to use lot of Python libraries so it becomes little difficult to keep on installing libraries one by one and tomorrow if you change your PC you're working in office you are working at home you may be working at maybe uh at some college or whatever. So then when you change your PC again the reinstallation of libraries is required. So you can save your time by using some kind of collab environment like this where you you know install it so that it becomes easy and becomes you know you having to keep code on one PC. See in PyCharm or in Visual Studio Code the code is in my PC. Yes. If you're carrying a dedicated laptop, cool. Then PyCharm and VS Code editor are very good. No doubt about it. Okay. And if you're doing some confidential work for your company, you're making your own project for your own startup or maybe for own proof of concept, then yes, working in PyCharm and VS Code editor is a good idea because you don't want to share your code. You have no intentions to share your code with anybody else. Then I think this is a good idea. This is a good one. Okay. Now for the sake of simplicity for all learners at simply learn not restricting to IIT Madras or IIT Bombay or IT Kpur batches no no I'm looking at in generic sense uh across students at simply learn globally we all use Google collab so that all of us are at the same page to use it and this is the easiest tool to use even for a fresher to actually start moving not been coding at all. This is the easiest tool to take a grip on. Okay. Now friends, like every programming language, Python programming language also has something called as language constructs. What are they literal and variables? Let let us say this way. Suppose if I'm asking my friends Hershett and Suresh their names. So let me how would I say you know I would say okay okay myself Rocky Jakani what's your good name so when I'm asking you this question in my mind there is a variable called name and my friend Sur says Rocky my name is Suresh so I'm going to hold his name into his variable but his name called Suresh is a literal his enrollment ID at simply learn is literal his age is literal his years of work experience is literal So the what is a variable? Variable is something which is going to hold. So I can think it this way. If I draw a box in front of you, this box is my variable. Whatever value you write inside the box is my lit. So this becomes the lit and this placeholder becomes the variable which is holding something for us. Okay. This could hold your age, years of experience, the company which bought with you. Let's move on. Next data types. Very basic question like to ask all of you friends. Is our age and our name data of the same type? Is our name and our age data of the same type? They are not good. Therefore, data types indicate what is the type of data. We all know that if I'm fetching somebody's age and somebody says that Rocky, my age is 25. Somebody says my age is 50. Cool. So I I don't hear anybody saying that my age is 25.37. I've not heard of anybody saying that or somebody coming in saying me that okay Rocky my age is 50.13. I'm sorry I never heard this. And therefore when anybody is giving me an age they don't give me decimal points. They only give me whole numbers. You see they only give me whole numbers like 25 and 50. And because they only give me whole numbers 25 and 50. Therefore my data type is int i in. But tomorrow if I'm trying to ask that uh when we get paid our salaries and our offices got our taxes. So a tax may not be exactly a whole number or tax can be 10,000 50%. Am I right or wrong my friends? Am I right or wrong? Right. So direction of tax can be a floating point number. Calculation of tax can be a floating point number. Your Uber ride from the place I stay in Bombay to the Bombay International Airport uh could be costing let's say 250 rupees and 50 pesa. It's possible. So your Uber rides can have floatingoint numbers. In fact, they mostly have your tax can have floatingoint numbers. So when you have floatingoint numbers like this that means you you decimal precision we say our data is either float and the data is in a smaller range and the data is of a larger range we say it's double but don't worry about in Python in Python we don't have float and double stuff we only have float data type so float data type itself is very very vast and in Python for god's sake like people coming from Java and net background have a habit of remembering the range of data types don't do that ever in Python. Python data type ranges are almost infinity. Trust me. You see, so in Python without decimal point int with decimal point float. Simple two data types. Similarly, whether the data is a single character or the data is a few set of characters that's immaterial. Both the data for me are string. with a single character or many characters in material. Consider what to be a string. Now with this very basic knowledge friends, let me move on to the next thing. Operators indicate the different set of operations you can perform on a data. So when somebody's writing 3 + 4 into 6 I know you will say that Rocky sir it's obvious you know 4 into 6 is going to be calculated first because it's been given in the brackets and then you're going to add three to it. I know but the idea what I'm trying to tell you is not the calculation here. The ident tell you is that the bracket, the multiplication, the addition, all this are simply said operators. So you have literals like three, four and six. You can place them in any order, right? If I change the position of the lits, I put three inside, four outside, my calculation will change exactly obviously. So or I put the plus inside and multiplication also, my calculation will change. So you can play around with these numbers that is the trails and these operators to get different answers. Now question is how do I run this? How did I get a green tick? Now there's a play button here. There's one option. Second option come to the cell click. And if you're using MacBook you can use shift return. If you're using a Windowsbased laptop then you can use shift enter. So when I shift enter, you can see the cell actually ran and all these cells are super simple. As you can see, some calculation is happening and we're getting the answers. Now you would notice that when an answer leads to a decimal point, you you get that right. Right? So this is now this is a floating answer. This is an integer answer. It's very simple. If my answer is having or my value or number is having no decimal point it's immaterial whether it's positive or negative no decimal point simple it's integer decimal point meet it float okay now what is next in every programming language you must have a facility to print your answer to print your question and to get the answer from the user so Print is so simple in Python. Print means it is going to print for you. So you can see that I'm printing two values here. And here I am declaring two string variables. The beauty is that in Python. You can declare strings in double quotes. You can declare strings in single quotes. You can also declare strings in triple quotes. We will come to a point where we use triple quotes. I know you'll say why we should use triple quotes when we can do things in double quotes and in single quote. Friends, there is a time that you may not have to assign only one or few words but you want to assign a whole paragraph. If you want to assign a full paragraph, so if you want to assign something like this, follow me along. Okay. How have you been doing? So I ran this code. Now I press an enter here. See the red line there is coming. I'll show you again. No red line coming. Huh? That means the declaration is correct. Okay. When I press an enter, I brought her to the next line. How I' been doing long time no see. I'm just asking you saying long time no see. You see you'll say rocket there seems to be something wrong. Yeah exactly. There is something wrong my friend. Therefore you are seeing the error. No otherwise why all this stuff is coming in red line. Now see what I'm going to do next. Okay. I am putting triple quotes here. I am putting triple quotes here. Red line gone. Oh. So if you want to assign multiple lines, correct? If you want to assign multiple lines of the whole paragraph which is going over multiple lines then use triple quotes. Either it can be triple double quotes or it can be triple single quotes. No difference both will work. Don't worry. Okay. Now I say run. Oh dream tech. Wow this ran. So let's see. Okay. Before this print, shall I put print B3 also? Let's have a look. So, first print B3 prints this entire par. Cool. And the second print statement is printing B1 also and B2 also with a concing between. Now with this print statement B1 and B2 with a concating in between. Like in many languages you can concat strings by using plus symbol. Same applies for Python also. It's a way to concat. Concat means join two strings. Okay. Now, very nice thing, sweet thing about Python is if you want to repeat a string, you can multiply it. Strange, huh? Yeah. But this is the way it is. So the variable A was declared as three. So when I say B1 into A, you would see that B1 value was Python. So notice that B1 into A has repeated the value of A. If you think you want to remove A, fine, remove A. Okay, remove A. Just keep it. Actually A was uh seven. I'm so sorry I mistaken. I just showed you this. A was seven actually because A was redclared as seven. So it was coming in as seven. So this is easier to understand. So B1 into three I'm repeating for three times. So the multiplication operator you know why I'm putting hashes. This is the way you write comments. So what I showed you right now was multiplication operator. The beauty is that all these operators are so simple. One time you see them you get them what they do. Now printing was giving was throwing output. Natural question which comes to your mind is Rocky what is the opposite of it? How do I get input from my user that is more necessary for exactly? So to get input from a user you will use the input function. So input function you are asking me your question whatever you want to ask here please remember is thumb rule never forget I given a comment here that's my thumb rule. Input always accepted as a string. Input always accepted as a string. Means whatever input you give me, look at the way I'm running this code. This input is waiting here. So I say my name is ABC and I press enter. You know what has happened? ABC has gone into the variable name. So wherever I use the variable name, I see ABC coming in the output. You get me? Wherever wherever I use a variable name, I will see ABC coming in the output. So, hello ABC. Congratulations on your first Python program. You see right? So, you get it? You got the output. Now, I'm writing the next piece of program. I want to recall the rule. I hope all of you remember the rule that the input function returns to us a string. You see whenever I use an input function it returns to me a string. You see so when the input function my friend returns to me a string I need I need that we should appreciate this that I can't take a string and divide them among each other. Strings are not numbers. No. So to do any mathematical operation I need rumbers. Therefore, an input function is going to be accepting your input as a string. You put the whole input function as a parameter to a type casting function. This type casting function here will convert your input into whatever you want. If you say float, it will convert to float. If you say int, it'll convert to int. I have set float. So obviously this whole input gets converted into a float and that data is coming into the variable called dividend. The next data is going into the variable called divisor. I'm doing nothing big. I'm just kind of dividing the two and getting my result into the quotient and then further I am printing the quotient and I've given both the options here. Converting to integer will be int. converting to float is a function called float. Now let us all experience how this code is going to run. Let me run the code for all of us friends. Let's say 50 and let's say the divisor is 3.5. Cool. So answer is 50 divid by 3.5 is 14.285. So on and so forth. Now I would and you know I'm not so comfortable seeing the output of question coming. Oh my god, so many floating pointles after the decimal doesn't doesn't make sense, right? Nobody wants such precise answers. It's okay if you give me the answer up to two digit precision. So, but natural is that after this normal print statement, you and I may feel can we round the quotient, right? We should. So, we put as rounded quotient is equal to we use the round function. Put the brackets there, comma 2. Let me close it and let's try this fence. I'll this time give the same inputs like I gave last time so that we have a quick comparison of our answers. 14.28 and this is like too clumsy to look at so many digits and 14.29 looks more decent easier to comprehend for us. Now friends, I'm quite confident you I'm feeling confident of my batch that they would have understood this very simple program. Now let us do one small thing friends. Very very small thing. Okay. So I would like to first tell you two things. First how do you use geminy? Like you can use copilot. Similarly, you can use geminy or chatg or claude for helping you to generate code. That's good. But I always insist people who are learning to program in this language don't immediately get uh used to using it. When you get stuck, you use. So if you get stuck, how do you use directly you need not go outside to any other tool from here only click on generate with AI. See this is a code block, right? How do you get this code block? You click on code here. You see if you click on code you get a code block okay click on generate he'll ask you for a prompt simple as prompt engineering you give a prompt he'll write the code for you okay so let's say I'm writing a prompt here to generate a code for printing 10 prime name rumbus. Wow. Done it. So he says that he has a function called is prime which is responsible to check if a number is prime or not. And if it is prime obviously I'm going to return true and if it is not prime I'm going to return false. The function print primes is asking us for a count. If the count is 10, then I will print 10 prime numbers. If the count is 20, but naturally I will print 20 prime numbers. So on and so forth. I've set up a while loop here which will go on up till the count value. As you can see, understand about logically. You don't put too much of stress. You know, if you are new to Python, don't put too much of stress. Oh my god, Rocky, I don't know what is VU. I don't know what is Fon. So, don't take stress because there are also prerecorded do-ityourself videos on simple learns portal that you need to go through. So, you need to always understand the program logically. You see logically you should be clear of the program. But while loop means I'm going to run that steps for a certain number of times, but I need to check whether my condition is getting satisfied or not. So for that purpose okay if structure has been used you see. So I hope this program is giving you a kind of an idea that generating code is super easy. But the problem is friends if you keep generating code like this then as a as a senior trainer in this field you know I have a fear that when you actually have to code you know in front of somebody uh you may get stuck actually you see so seek help don't give him the whole code to code okay later on yes but not at this starting phase Okay. Now what I want you to do is two things. First is to use this kind of a prompting. You not generate 10 prime numbers. You do whatever prompting you want to and get the code here and try running the code. I didn't try running this code. No, my mistake. My bad. Let me try running the code. Have a look. You can check yourself. 2 3 5 7 11 13 17 and 2. Yeah, this is all prime numbers. Is that correct? Okay. Now I'm putting a comment here and I want all of you to think with patience how will you write this kind of code. So I want you to accept different salary components. What could be the salary components looking like? We could have an H. Okay. Of course I'm so sorry. We're going to have the basic first obviously. Okay. Uh first is going to be the basic. Uh 30% of basic let me take it as H. Of course H will vary from state to state. Could 30% could 35% also vary from state to state. Okay. What other components would you like to suggest me? Come on. Come on. Other components basic 30% of basic is H of course. PF 12%. Should I keep 12%. Come on. 12% 15% what? 12%. Okay. PF 12%. Okay. So 12% of basic is PF. One more. One more component please. One more component. Only one more be specific. Which allows should I keep traveling allows as 5,000 rupees? Is it okay? Petrol allows. Traveling allows 5,000 is fine. Okay. Sure. Okay. Da I forgot D. Right. D in. What percentage should I give? D 20 percentage. 5%. Okay. Performance allows. You want me to keep gurujit. Performance announce. Okay. I will. Performance is a variable component. I don't know. What percentage? What? 5% 6% what tell me guruji tell me the percentage please 5% okay let me not keep both I'll give 6% gi because I just want to avoid confusion this 5% is 6% okay right now so friends you have these details in front of you now what the logic could be first thing the logic only then code you are not able to code I don't have a problem But if you're not able to think of the logic, I have a problem. Okay? Without logic building, you're going nowhere. Even the prompt engineering tool cannot help you because in the prompt, you have tried the logic so that he gives you the correct program always. Otherwise, he will keep giving you the wrong wrong program which you will feel is correct. You get me right. So what the logic could be? Logic could be accept my basic. Of course, you're going to accept my name also. No, she'll accept my name and the basic component salary. We have to then the next object is going to be calculate what this what this all calculate this all 30% H 30% of basic HR 12% of basic PF 5% of basic DA 6% of basic performance allowance. So what next? Add up all components, right? Add up all components. That's it. Print final s. This is the logic. So friends, I want you to think if I miss some step in the logic, you can please correct me. So the my first step is going to be there is a name and there is a basic again if you notice see what happened see what happened in front of you you'll say Rocky this is helping you ah exactly this is going to help you so you haven't to use copilot or you know geminy or chajipity or claude externally you are having everything here that's it. You just built the logic. He learned what logic I built. Now he will keep guiding me according to logic. I have no problems. I find this is good. So I say tab. Moment I say tab. He has accepted your name. Put into the name variable. Accepted your basic salary. Convert to float. You put in the basic variable. Very nice. So remember to type the logic first so that you can get help. I'll tell you one thing very good. One thing is when you are coding here, collab notebooks uses internally Germany. Germany learns what kind of coding you're doing. So the more you code yourself here, the more the better the help he can give you because he understands you. You see right? Okay, Gurjit, you are asking me that I have taken performance. I've taken every component here as monthly to calculate monthly salary. Okay. At the moment. So name something basic something. Cool. What I want to do now is calculate. You'll see Rocky that simple. Exactly where I'm saying this is complex. Did I ever say that? No. So I want to calculate 30%, 30% means.3 of what? obviously have the basic friends and okay so that's your basic here now I can do the same logic for provident fund see this see this I'll type it again now see this what happened you'll say wow this is nice that is advantage of having logic above if I had not typed the logic then please remember what you see on my screen as a hint would have never come. Now I have to only type tab and he completes the whole thing for me. This is Rocky. This is H. This is provident fund. This is DA. Okay. And this is performance allows. Cool. Makes sense to me. So now I have calculated total salary. So I say final sal or if you say no Rocky no finance say only salary. Cool. I have no problem. I'll say as you say sir. So salary is equal to obviously I need to have basic first. Sorry. Plus wow this is nice. He's having brains huh. Tab. So I press tab. He comes. It brings in everything. Now I would like to run this code friends. So I say shift enter. See is asking me your name. So I'm entering your name as ABCD. He's asking what is the basic salary. So I enter basic salary is let's say one lakh. Now he says Rocky if your salary is 1 lakh then your takeaway home or your gross salary should be 1 lakh 53,000 with me. So friends did you learn the way I am coding? I'm not teaching you this program. I'm teaching you the way of coding. I want you to cultivate this habit. In this three sessions, you have to cultivate this habit because we're not going to sit back and code in the class. As the time progresses and as you move ahead with courses which are machine learning, deep learning, genai based, you will have very large programs. So if you code like this, your Germany and collab notebook will learn you more and more and more and will help you more and more. Now I'm closing this notebook and I'm going to the next notebook which is very similar. It's very similar to the next previous notebook. Okay. So there are a lot of examples here. Some examples of course I'm going to skip because they are very very simple friends. Now if I look at this piece of code the initial part is very straightforward of what is an integer, what is a float, what is a string and what are boolean types. Boolean types means true or false. So I think something which I can you know uh skip something which I can skip uh and you know keep it for all of you to investigate is the first few programs the first few code snippets. By the way one one small thing double asterisk in Python means raise to so this means I am taking this number raising it to 100. I'm taking this number raising it to 100. Okay? Right? So you'll say Rocky this number itself is so big. Raising it to 100 is going to be phenomenally big. I told you some time back friends never ever bother about data ranges in Python. If you start bothering you're wasting your time. Don't do that. See the number output I got in Python. See this is like phenomenal. This seems to be like weird. see this the rumber flows on and on. So, Python is not going to give you an exception uh you know of rumb out of range and all that stuff like Java or JavaScript does. Don't worry about all those things in Python. Okay. So, you have these good examples here. Then this is something which I always tell my batchmates to scan it yourself where you should know that there is something called as a scientific notation to represent rumbers in which we use the term called e. E here means base 10. The term e here means base 10. So something which is u number like 4 e2 it actually means 4 into 10 to 2 and something like 7.38 eus 3 corresponds to 7.38 into 10 tous 3 so on and so forth right so I hope I'm not confusing anyone friends so this seems to be clear now obviously you should you know feel to ask me that Rocky when will I do scientific notation that's a good question so you should do scientific notation when the number is too big or too small you see when the number is too big or too small so the number is too big or too small then the idea is that it's going to be actually it's good that we use the scientific notation you see right Okay. Now we move further friends to look which I'm giving you the work is to go through all these programs. So in strings we have all these data members are of type string. I can have single quotes. I can have double quotes. I can have triple quotes. You see all of them being used for the purpose of being holding strings. Idea is very simple. If you have a single line data, you can use double quotes or single quotes. Okay? And if you're going to have multiple line data members, then you should use triple quotes as you could see here. You see, right? I hope you're able to get this point very clear. Okay? Now we move for the all these are very oneliner programs which are very similar to what we have done in the previous notebook that's just for practice which I want you to just go through once and run it one small thing a is true print a which will actually be holding a data as true or false and then go ahead printing that Okay, we move further here. Application of boolean indicates that when we use boolean data, we are able to take a decision. So the application of boolean is to take decisions. So whenever you use relational operator, the outcome is a boolean data. So is A equal to B? Answer is no. So it printed for me false. Is A less than B? Answer is yes. So it printed true for me. So this true and false can be used for decision making. So you need to have a if else construct to take a decision and therefore the outcome of this relational operator which can either be true or false will help if to take a decision and thereby a decision that is taken here indicates whether the data is equal or not equal. Okay. Right. I hope up till this point things are going very simple and very clear. Okay. Right. So, Shanu says under the hood, what is a storage model? Storage models will not be discussed. This is not advanced Python class and this is not a class for memory storage discussions. This is just three classes for getting you acquainted with programming fundamentals. So, this will not be discussed. Akash we have a function called log which is separate. Uh that doesn't applies here in the eB. So this e is not log. This e here is 10 raised to something. When talking of log, there are log to the base 10. There is natural log also. So there's separate function called log in the math library of python which can help you doing that. Okay? Right? So friends, I want all of you to take maybe maximum 3 to 5 minutes not more than that please 3 minutes is 3 to four minutes is good enough. trust me to quickly run through this sample programs which which I just spoke about right now. Go through this and run them. So let us move ahead as the same speed what we move right now. Now this is like too simple friends. This is just too simple. Okay. The good part about Python friends is that Python is a dynamically typed language. Like if you compare with Java you first have to declare a variable. Also with C or C++ you first declare a variable of a type and then assign value to it. Java is reverse sorry Python is reverse through Java it's dynamic type language which means whatever value you're assigning to me. A says whatever value you're assigning to me I will derive my data type. Nice. No this sounds nice. No. So whatever value you are assigning to me, I'll derive my type. So type A indicates what is the data type of the variable A. Simple as this, right? So if I run this piece of code, I realize that what I'm getting is class float and class int indicating that in this case the type is float. In this case, type isn't. This is nice. Wow. Okay. Further when I take an input friends, it's immaterial. Whatever you input, input function will always return data of type integer only. Example, if somebody says that no Rocky, I have entered 23 and 67.8. 8. Please be don't be under the wrong impression. You not entered integer and float here because input function by default will accept the input always always as a string only. Okay. What you could do is as an extra work is find the type of both the variables to prove to yourself. You see to prove to yourself like for example please have a look what happens now I'm entering a number 23 and it says that this is a type data string I enter 45.78 it still says you have entered a string obviously no I have never converted it when did I convert my input into an integer or into a float I didn't do it so it's going to be string naturally right the beauty of strings is they are concatable. So if I have this kind of data, I can actually concat them. Notice this 23 concat 45.78. Oh, right. So concatenation. You can find type like this also. Okay. This is simple concatenation. But if you wish to convert into an integer or a float, you will use a type casting function int or float which you have already learned my friends. Okay. Right. We will discuss if required a few programs. Let me tell talk about one or two so that you can quickly go through them and then obviously I plan to give you a freshening a break. Okay. Because listening to somebody for continuously one and a half two hours is also difficult. So let me but discuss this. Okay. This first one at least. Okay. So there are some program written here. Find sum, difference, product and true division of two inteious. Okay, this is simple. Write a program to find area of a rectangle. Okay, cool. So, let's do this. So, we are finding area of a rectangle by accepting two inputs both converted into float reasons known to all of us friends. Area found but area could be a very floating point precise number. So I don't want you know lot of digits to be printed here. So the best option is to go by rounding the function. Let's have a look. So 45.67. Okay. Next is 5.77 and it gives me the answer. But if I don't put rounding then it will give me an answer which is like too heavy in terms of right now. Let's look at the next one over here. It's a very straightforward program. You have got the two inputs A and B and you are performing all the four operations and in one shot you are printing all the answers. I know friends you may have felt that uh Rocky don't you feel that we should give a choice of the input operation which we should make. I think that makes a lot of sense. So we can definitely add a code here instead of doing all the four operations. Okay, let me let us do that. Okay, let us say that okay, we we can do all the four operations but we can also write you know we can also add on on our own the version two of the above code in the same piece let the let all answers get printed there's no problem the version two of the above code could be that you know I could ask my user for an input option you see I could ask my user for an input option where we could ask him a option will not be a float right so I'll just put it as int only and I'll say enter an option see there can be many permutation combinations for this we can improve this program and sit for one hour and keep improving this but the whole idea is that in a calculator you don't do all the four operations if you are taking two inputs you always ask the user what choice he wants to have So, we're just trying to make a little more realistic. So, we're asking for an option and he will enter an option, but he could enter anything, right? So, if he is entering an option, oh, what is this? If he's entering an option, oh, this makes sense to me. He found out the whole answer. If I'm entering the option as plus, I'll do this. Else if minus, I'll do this. LF multiplication I'll do this l if division I'll do this but I see one thing is missing it's not missing he's leaving he's leaving it to you he's leaving it to you because he does not know what is a failsafe operation understand you have to decide the safety net how can he decide a safety net for you so if the option is none of these if the option is none of these then what we'll do is we have to decide now how can he decide for us so he not sgesting also and I think that is a wise decision You should not suggest we should do it ourselves. So I should say wrong operator. Okay. Or I can politely say to the person that please check your operator entered. I think that will help him tell the user. Correct. So let us do this once friends. I run the code. Oh I forgot to put double I forgot to put the colon symbol. See I made a mistake. Okay. So let us enter some input. 45 and four let's see first all answers got printed in front of you but version two is running now so version is asking what do you want to do so let's say I want to do multiplication and he says answer is multiply at this point 180 that's right okay so I think this version two all of you can dynamically add right now that's not a big deal this is a this is just too simple okay so you and run all your code blocks. Friends, up to this point, the very basic uh math module. So the very basic module is going to the math module. If I import the math module, I will get all built-in math functions which I one can think and use like sine, cos, log, you know, various functions. To know how many functions or constants does a module has, you can try using the function called help. So, help and math, you'll get the answer. But nowadays, people don't do this. What people do nowadays is straight away take the module name and ask a question on CH GPT or on claude or on Germany and they get the answer. This is a trend which I've been noticing in everyone in the last one year and it is absolutely okay. It is fine. No need to do this. Ultimately you want to know about the model. So either way around you can know about the model. That's okay. Absolutely. Now there is some small demonstration here of some math functions. So if I want to find factorial of some rama there is no need to write any program. There is a ready function friends called factorial. Please notice okay and right. So you can use factorial function. You see and factorial gives you the answer. So you can see the answer coming up here. Rounding is being done. You get the round answer. Seal means you know let's say you are standing on you know wherever you are right now. Let's say you stand up. So the floor you stand and there is a ceiling above you. So ceiling means I can't go above it. Right? So if you write a number here, ceiling will take you to the next highest integer number 5.001. The next highest integer is six. Right? So math dot seal you get the answer as six. And math do.f floor you get the answer as uh you know seven. So I hope you kind of get this. It's very simple and it's clear that uh seal is going to give you take you to the next integer and floor will take you to the next lower integer. At a very basic level, we have now a decent knowledge of how we can print, how we can accept input, what are the different data types available in Python and of course we know bit of math functions also. The idea is that you see I can go to the next notebook also but the idea is not that. The idea is that you should be able to build on some logic and do some very basic coding yourself without the help of chat GPT without the help of any geni tool. Doing it yourself is also fun. Okay. So what is my requirement now? Let's think about it. Friends, we all know that there is a process of login in every application and a login process. The login process requires one to verify their username and password. Am I correct or wrong friends? I hope I'm correct. Right. It requires to login verify your username and password. That's a login process. So verify username and password. So my requirement goes something like this. So sorry my requirement goes something like this that I want to accept the username. Okay. Username can be small or big that I can't control. User has a choice to choose a username. Okay. Similarly, we will accept the password also from the user. But friends, in password, you can put limitations and restrictions on the minimum size of it. Right? So, we want a minimum of or minimum length you see of of the password to what? Let's choose. What should we keep? Eight or nine? Come on, you choose. 7 8 9 10. What? What do you want? You choose. Okay. Yes. Eight. Okay. Eight. Fine. So, minimum length we want is eight. And should we keep some more constraint like alpha numeric? Come on, take a call. Should we get alpha numeric? Make it's fun. No. Yeah, we should. Right. Okay. So password should be alpha numeric. Okay. And and it should have see it can be at least one or it should be exactly one. Now this is a call which we can take. So we'll keep at least one special character. Okay. Or spelling mistake. Sorry. Right. So this is what the requirement is. Uh if it is success. So if username logical and password you see if username and password uh both now when you say Rocky how do you say if username and password both are matching? Correct. You are correct. Now, how do I say username password both are matching? So, what we can do is uh before the login process, we can tell the user to register and in registration we will obviously accept the username, accept the password you see with the following constraints which we have already discussed. There is no need to redisuss it. So this is sorted and during the login process we will verify if username and password both are validated. So validation is different. Now validation means the above steps. Validation means above that it should alpha numeric and all that stuff. Here is an both are validated. Then verify with uh the register details. Registration was done once. No, registration will be done once at the start and then you always compare with the registration. So there is difference between validation and verification. My friends, validation means that there are some thumb rules or some input rules of your system. Example password should have minimum length of eight characters is validation not verification. Verification would be that uh what password you have entered during the process of registration. I like to verify against that. Okay. So username and password both are validated then verify with the registration details. Uh in this case any one condition can be true. That means let's say you can login or get an OTP either through a mobile number or through a email id. I'm just giving a situation. You see I'm highlighting this a greater than zero. But I'm I'm giving you a practical situation. So let's say you want to get an OTP off on a website. Website says enter your email or mobile number. So either this or this. Anyone should work. If anyone works great you can login. Not is actually to reverse things. That's it. Okay. Now, operator precedence is something you really haven't to study or remember but because you're not supposed to go and give a theoretical exam here but then okay you should be aware about it at least that there are precedences in operators in operator we have a precedence which we called as PEMDAS look at the rule P M D A S Pas where P stands for parenthesis E stands for exponent M stands for multiplication D for division either whichever division a for addition s for subtraction that means in an expression when all these things are given together what is going to first work is what is given inside the brackets you see what's given inside the brackets it's going to work first okay so in this entire expression first this bracket is going to get performed right after this bracket gets performed then you will you know actually now if you notice over here I don't see the comparison operator anywhere please notice I don't see the comparison operator anywhere that means comparison operator is going to be even after this so after 4ID by two I'm going to add one to it then I'm going to compare with greater than two or not you see same applies here first I will do 4 to 2 which is going to be 8 then I will check is three greater than 8 or not okay so the first answer is false second answer is true false and true is obviously false So when you solve a problem you haven't to do that friends but then idea is if you solve the problem in your mind then applying pdas rule will help you to know how the expression is evaluating. One very simple thing when you use comparison operator in Python remember whether a number is an integer or is a float fundamentally it is comparing a number to a number. So don't worry about the fact that I'm I'm putting three here. I'm putting 3.0 here. So Rocky this is not same. How I'm getting true? I appreciate friends this is Java maybe C or C++. I am assuming that you may not get true there. But in Python you do get true because Python says both are fundamentally number data types to me. So he understands that both mean the same thing. No wonder I get the answer as true. Next this is a very interesting operator friends called membership operator. It is used to check is the left entity present in the right data. I repeat is the left entity present in the right data. If it is yes I'll get the answer is true. You say okay P is there in Python. Uh-huh. This capital P there's a small P. Tomorrow if you write capital P here then you will definitely get yes. I'm going to say true. Similarly here I'm trying to check whether five exist in this list of numbers and it does. So I get the answer as true. I know in your minds you will be wondering what are the use of this. Okay. Imagine I have uh names of five people like Rocky, Chandra, Prau so on and so forth and I want to check is let's say somebody called Sema is she there in this list of people. If she's there, I'll get the answer as true and if not, I'll get the answer as false. Simple, right? Okay, this is very simple. Augmented assignment operator means you're doing kind of a shortand trick here. So, initially a is 1. You're saying a + 1. A + 1 where a plus equal to 1 means you are incrementing a by 1, which gives you the answer as you can see as two. Okay. Similar examples here for other operators. Okay. Now this is using the math library which you saw yesterday also. [clears throat] Forget the practice problems please. So you know you can skip after this. Yeah as a homework you may go through. I'm not denying it. Like for example this is a nice program uh where I'm expecting you to accept your name, age, gender, occupation, your weight in kgs and your height in inches and I want you to calculate the BMI. Right? [clears throat] Right. So the formula for BMI is I'll take the weight divided by the height. Now because friends the height is given in centm so I have to convert it into meters. Now that's the formula right you divide the weight by height in meters. So I'm accepting your height in centimeters and I'm going to divide it into meters and then I have to raise it to two. So this is going to be like height in meters squared. So weight divided by height in meters the whole square. So I get the value of BMI. You see somebody's data has been entered and I got the answer as this. Okay. Now don't get confused here and don't take too much of stress. You know I I've done all permutation combinations of uh all these operators. You may feel to ask me that Rocky why false or one is false? Please don't get into it. You know you will be wasting your time. Okay. So because you're not please understand friends your objective is not to go ahead uh compete with an interpreter of Python you know if you're a fresher and you think that you're giving a competitive exam that also based in Python somewhere which is very rare and then you need to go in with this kind of so that's a different issue you know Python certification exams have these kind of questions coming in but not otherwise no company is going to ask you these questions but I've kept it here for the heavily inquisitive mind that okay can I do this can I do that So I have kept it here you see so that okay they are relaxed okay this is possible by the I'll give you one simple trick friends whenever there is an or operator no please remember or operator locates what is true so whether I have a true on the left or on the right or will look at that so if I look at one or false if I look at o
Original Description
🔥Professional Certificate in AI and Machine Learning - https://www.simplilearn.com/professional-aiml-program?utm_campaign=bvX4t8PLeqU&utm_medium=Lives&utm_source=Youtube
🔥IIT Kanpur - Professional Certificate Course in Generative AI and Machine Learning - https://www.simplilearn.com/iitk-professional-certificate-course-ai-machine-learning?utm_campaign=bvX4t8PLeqU&utm_medium=Lives&utm_source=Youtube
🔥IITM Pravartak - Advanced Executive Program In Applied Generative AI - https://www.simplilearn.com/applied-generative-ai-course?utm_campaign=bvX4t8PLeqU&utm_medium=Lives&utm_source=Youtube
This video on Python Full Course 2026 by Simplilearn is a complete beginner-friendly guide that helps you understand Python programming from the ground up in just 4 hours. The course covers core concepts like syntax, variables, data types, control flow, functions, and basic problem-solving using real examples. Designed with a practical learning approach, it shows how Python is used in data analysis, automation, web development, and AI. This tutorial focuses on building strong fundamentals, making it easier to move into advanced Python use cases and real-world projects with confidence.
Related Videos:
✅ 1. Python RAG Tutorial 2026 - https://youtu.be/WQTaM7tBlvc
✅ 2. Python For Data Analytics Full Course 2026 - https://youtu.be/bqH8t7OsFVw
✅ 3. Python Tutorial with Gen AI for 2026 - https://youtu.be/n7_SsIVQRUs
✅ 4. Data Structures And Algorithms In Python - https://youtu.be/n5XQkv5mAao
✅ 5. UV Python Tutorial - https://youtu.be/8yvySYRc58M
✅Subscribe to our Channel to learn more about the top Technologies: https://bit.ly/2VT4WtH
⏩ Check out More AI Videos By Simplilearn: https://youtube.com/playlist?list=PLEiEAq2VkUULyr_ftxpHB6DumOq1Zz2hq
#python #pythonprogramming #pythontutorial #pythonforbeginners #python3 #pythonprojects #pythoncoding #pythonfullstack #pythonfullcourse #simplilearn #2026
➡️ About Applied Generative AI Specialization
This Applied Generative AI course e
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from Simplilearn · Simplilearn · 0 of 60
← Previous
Next →
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Ethical Hacking Full Course 2026 | Ethical Hacking Course for Beginners | Simplilearn
Simplilearn
AWS Full Course 2026 | AWS Cloud Computing Tutorial for Beginners | AWS Training | Simplilearn
Simplilearn
Data Structures And Algorithms Full Course | Data Structures and Algorithms Tutorial | Simplilearn
Simplilearn
SQL Full Course 2026 | SQL Tutorial for Beginners | SQL Beginner to Advanced Training | Simplilearn
Simplilearn
Microsoft Azure Full Course 2026 | Azure Tutorial for Beginners | Azure Training | Simplilearn
Simplilearn
Shopify Tutorial For Beginners 2026 | Shopify Course | shopify dropshipping | Simplilearn
Simplilearn
Six Sigma Full Course 2026 | Six Sigma Green Belt Training | Six Sigma Training | Simplilearn
Simplilearn
🔥Feeling Stuck? How Upskilling Can Boost Your Career! #shorts #simplilearn
Simplilearn
Growth Hacking In Marketing | Learn Growth Hacking Marketing Strategies | Simplilearn
Simplilearn
🔥Cracked 3 Job Offers with One AIML Course! | 20–30% Salary Hike #shorts #simplilearn
Simplilearn
Top 10 Must-Have Figma Plugins for UI/UX Designers in 2026 | Figma Plugins | Simplilearn
Simplilearn
Business Analytics Full Course 2026 | Business Analytics Tutorial For Beginners | Simplilearn
Simplilearn
Simplilearn Reviews | Getting future-ready with course in Artificial Intelligence | Roopam’s story
Simplilearn
Generative AI Full Course 2026 | Gen AI Tutorial for Beginners | Gen AI Explained | Simplilearn
Simplilearn
Full Stack Developer Course 2026 | Full Stack Java Developer Tutorial for Beginners | Simplilearn
Simplilearn
Simplilearn Reviews | How David Went From Seasoned Engineer to AI Innovator #GetCertifiedGetAhead
Simplilearn
Complete Social Media Marketing Strategy for 2026 | Social Media Marketing Strategy | Simplilearn
Simplilearn
🔥Top 4 Cybersecurity Certifications You Need! #simplilearn #shorts
Simplilearn
🔥Cloud Engineer Salary in India 2026 | City-Wise Breakdown #shorts #simplilearn
Simplilearn
Digital Marketing Full Course 2026 | Digital Marketing Tutorial For Beginners | Simplilearn
Simplilearn
Full Stack Java Developer Course | Full Stack Java Developer Tutorial for Beginners | Simplilearn
Simplilearn
Social Media Marketing Full Course | Social Media Marketing Tutorial For Beginners | Simplilearn
Simplilearn
How To Create LLM Chatbot Demo 2026 | Build a LLM Chatbot From Scratch | Simplilearn
Simplilearn
Digital Supply Chain Management Certification | Supply Chain Management Course | Simplilearn
Simplilearn
AI Agents Full Course 2026 | AI Agents Tutorial for Beginners | How to Build AI Agents | Simplilearn
Simplilearn
ITIL Full Course 2026 | ITIL 4 Foundation Course | ITIL Tutorial For Beginners | Simplilearn
Simplilearn
Generative AI Full Course 2026 | Gen AI Tutorial for Beginners | Gen AI Explained | Simplilearn
Simplilearn
ITIL Full Course 2026 | ITIL 4 Foundation Course | ITIL Tutorial For Beginners | Simplilearn
Simplilearn
Simplilearn Reviews | Integrating AI & Music | Diego's Story
Simplilearn
Digital Marketing Full Course 2026 | Digital Marketing Tutorial For Beginners | Simplilearn
Simplilearn
SEO Full Course 2026 | SEO Tutorial for Beginners | SEO Training | SEO Explained | Simplilearn
Simplilearn
PMP Vs CAPM: Which Certification Should You Choose? | PMP Vs CAPM | Simplilearn
Simplilearn
Complete Data Analyst Roadmap 2026 | How To Become A Data Analayst In 2026 | Simplilearn
Simplilearn
Generative AI Full Course 2026 | Gen AI Tutorial for Beginners | Gen AI Explained | Simplilearn
Simplilearn
🔥5 Jobs That Are Most Likely Safe from Layoffs in Today’s Market #shorts #simplilearn
Simplilearn
🔥Git vs GitHub – What's the Difference?
Simplilearn
What Goes Behind Building the Likes of Uber and Netflix? | Product Management Tutorial | Simplilearn
Simplilearn
AI Agents Full Course 2026 | AI Agents Tutorial for Beginners | How to Build AI Agents | Simplilearn
Simplilearn
Full Stack Developer Course 2026 | Full Stack Java Developer Tutorial for Beginners | Simplilearn
Simplilearn
Product Life Cycle 2025 | Stages Of Product Life Cycle | Product Life Cycle Tutorial | Simplilearn
Simplilearn
Project Management Full Course 2026 | Project Management Tutorial | PMP Course | Simplilearn
Simplilearn
PCB Design Course 2025 | PCB Designing Explained | How To Make PCBs | Simplilearn
Simplilearn
Python Full Course 2026 | Python Data Analytics Tutorial For Beginners | Simplilearn
Simplilearn
🔥Top Product Management Skills You Need to Succeed in 2026 #shorts #simplilearn
Simplilearn
SQL For Data Analytics 2026 | Essential SQL Commands | SQL Tutorial For Beginners | Simplilearn
Simplilearn
Simplilearn Reviews | Paving Way To Success With AI & ML Course | Soumik’s Upskilling Journey
Simplilearn
Six Sigma Full Course 2026 | Six Sigma Green Belt Training | Six Sigma Training | Simplilearn
Simplilearn
Learn Snowflake In 45 Mins | Snowflake Tutorial | What Is Snowflake | Snowflake Explained
Simplilearn
🔥ML Career Tip – How to Start Learning Machine Learning in 60 Seconds! #shorts#simplilearn
Simplilearn
🔥Agile vs Waterfall in 60 Seconds #shorts #simplilearn
Simplilearn
Excel Full Course 2026 | Excel Tutorial For Beginners | Microsoft Excel Course | Simplilearn
Simplilearn
What Are AI Agents? | Types Of AI Agents | AI Agents Explained | AI Agents Tutorial | Simplilearn
Simplilearn
How To Create a Product Roadmap In 2026 | Product Roadmap | What Is Product Roadmap | Simplilearn
Simplilearn
SQL Full Course 2026 | SQL Tutorial for Beginners | SQL Beginner to Advanced Training | Simplilearn
Simplilearn
🔥What Is Phishing? #shorts #simplilearn
Simplilearn
Cloud Computing Full Course 2026 | Cloud Computing Tutorial | Cloud Computing Course | Simplilearn
Simplilearn
Simplilearn Reviews | Overcoming Rejection & career plateau to finding a New Job : Bhaskar Banerji
Simplilearn
Six Sigma Full Course 2026 | Six Sigma Green Belt Training | Six Sigma Training | Simplilearn
Simplilearn
Generative AI Full Course 2026 | Gen AI Tutorial for Beginners | Gen AI Explained | Simplilearn
Simplilearn
VLSI Design Course 2026 | VLSI Tutorial For Beginners | VLSI Physical Design | Simplilearn
Simplilearn
Related AI Lessons
⚡
⚡
⚡
⚡
Müşteri Değerini Anlamak: RFM, CLTV ve Tahmine Dayalı CRM Analitiği
Medium · Machine Learning
Müşteri Değerini Anlamak: RFM, CLTV ve Tahmine Dayalı CRM Analitiği
Medium · Data Science
Müşteri Değerini Anlamak: RFM, CLTV ve Tahmine Dayalı CRM Analitiği
Medium · Python
Surviving the Data Science Behavioral Interview
Towards Data Science
🎓
Tutor Explanation
DeepCamp AI