Python Full Course 2026 | Python For Beginners | Python Basics For Beginners 2026 | Simplilearn
Key Takeaways
This video teaches Python basics for beginners, including Python programming and AI and machine learning applications
Full Transcript
Hey everyone, welcome to this course on Python fundamentals by simply learn. Ever wondered why learning Python is a gamecher in the tech world? From building simple programs to unlocking powerful machine learning models, Python is the key. 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 PEMDIS 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. Well, 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 chat GPT DL2 and hugging face. You'll also gain practical experience to 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 SimplyLearn'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. One, 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 out, 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 innet 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'll 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 haven't 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 IIT Kpur batches. No no no I'm looking at a 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 who's 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 Hershit and Suresh their names. So let me how would I say you know I would say okay okay myself Rocky Jaktyani 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 Suresh says Rocky my name is Sur. So I'm going to hold his name into his variable but his name called Sur 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 the 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 for which you work, you know, XY Z. Great. 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 and 50 peso. Am I right or wrong my friends? Am I right or wrong? Right. So direction of tax can be a floatingoint number. Calculation of tax can be a floatingoint 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 about 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 identity 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 is positive or negative no decimal point simple it's integer decimal point mean 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 the whole paragraph. If you want to assign a full paragraph, so if you want to assign something like this, follow me along. Uh, 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 it to the next line. How you 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. Where is something wrong my friend? Therefore, you're seeing the error. No, otherwise why all this stuff is coming a 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 para. 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 concing 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. 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 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 commands. 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 this thumb rule never forget I've given a comment here that's my thumb rule input always accept it as a string input always accept it 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 the 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 any drums and 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, he'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 the 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 points after the lesson. It doesn't doesn't make sense, right? Nobody wants such precise answers. It's okay if you give me the answer up to twodigit 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 friends. 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 gemony like you can use copilot similarly you can use geminy or chatgy 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. So click on generate it. 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 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 I don't know what is no 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. 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. Do 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 20. Yeah, this is all prime numbers. 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 a basic first obviously. Okay. Uh first is going to the basic uh 30% of basic let me take it as H. Of course H will vary from state to state to 30% to 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 allowance 5,000 rupees is fine. Okay. Sure. Okay. DA I forgot right D. What percentage should I give D? Tell me percentage. 5%. Okay. Performance allows. You want me to keep Git performance announce? Okay, I will. answer is a variable component. I don't know how what percentage but 5% 6% what tell me gi tell me the percentage please 5% okay let me not keep both I'll keep 6% goj 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 bas basic of course you're going to accept my name also. It'll accept my name and the basic component s we have to then the next object is going to be calculate what this what this all what is calculate this all 30% HR 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 my 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 to the basic variable very nice so remember to type the logic first so that you can get help and tell one thing very One thing is when you are coding here, collab notebooks uses internally geminy. 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's 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 final 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 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 abc CD 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 are 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 phenomenon. This seems to be like weird. See this the rumber flows and on. So Python is not going to give you an exception uh you know of rumber 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 numbers 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 drumble like 4 e2 it actually means 4 into 10 to 2 and something like 7.38 eus 3 corresponds to 7.38 into 10 to -3 so on and so forth. Right? So I hope I'm not confusing anyone friends. So this seems to be clear. 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 if 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 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 further. 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 that doesn't applies here in the e base 2 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 a 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 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 to Java. It's dynamically 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. 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 eight. Please be don't be under the wrong impression. You have 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 mean 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 1 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 or 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. LF division I'll do this. But I see one thing is missing. It's not missing. He's living 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 the 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 you're not suggesting 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 enter. 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. Right. 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 two 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 this is just too simple. Okay. So you can run all your code blocks friends up to this point. The very basic uh math module. So the very basic module is called 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 dot 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 in 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 be keep eight or nine. Come on you choose 7 8 9 10. 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. 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 except 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 given the name 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. If 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 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 is 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 four divid 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. So 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 two 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 very simple augmented assignment operator means you're doing kind of a shortand trick here so initially a is one you're saying a plus equal to 1 a + = 1 where a + 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. 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 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? So the formula for BMI is I'll take the weight uh divided by the height now because friends the height is given in cm. So I have to convert it into meters. 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 uh 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've 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 one or false I'll get the answer as So Rocky how one why not true? Because understand friends or operator does not goes for false at all. So if he does not go for
Original Description
🔥Professional Certificate in AI and Machine Learning - https://www.simplilearn.com/professional-aiml-program?utm_campaign=lRfjnTYJnJ8&utm_medium=DescriptionFirstFold&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=lRfjnTYJnJ8&utm_medium=DescriptionFirstFold&utm_source=Youtube
🔥IITM Pravartak - Advanced Executive Program In Applied Generative AI - https://www.simplilearn.com/applied-generative-ai-course?utm_campaign=lRfjnTYJnJ8&utm_medium=DescriptionFirstFold&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 Specia
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
⚡
⚡
⚡
⚡
The HiPPO is always right
Dev.to · Sharmin Sirajudeen
How to Extract Saudi Arabia Property Data Across Bayut.sa, Wasalt.sa, Aqar.fm and PropertyFinder.sa
Dev.to · Omar Eldeeb
Norway vs France (1:4) — A 97% Crime Index Anomaly: When Ruthless Efficiency Buries the xG Evidence
Medium · Data Science
How to Build an H-1B Salary Database by Employer (the Real Data Source + Python)
Dev.to · Omar Eldeeb
🎓
Tutor Explanation
DeepCamp AI