Python Basic Fundamentals | Bibhatsu Kuiri | Skillshare
Play Speed
  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x
15 Lessons (1h 12m)
    • 1. Course Intro Video

      0:26
    • 2. Lecture 01 How to Download Anaconda

      5:21
    • 3. Lecture 02 How to download Python on your Phone

      2:54
    • 4. Lecture 03 Basic math operations

      6:10
    • 5. Lecture 04 Variables and operations

      5:02
    • 6. Lecture 05 Introductory concept on strings

      6:09
    • 7. Lecture 06 Introductory concept on strings 2

      7:55
    • 8. Lecture 07 Introductory concept on strings 3

      5:23
    • 9. Lecture 08 Input and Output introduction

      4:38
    • 10. Lecture 09 Input and Output introduction 2

      2:01
    • 11. Lecture 10 Loop introduction

      4:16
    • 12. Lecture 11 For Loop

      7:08
    • 13. Lecture 12 While Loop

      2:36
    • 14. Lecture 13 break Loop

      6:22
    • 15. Lecture 13 continue statement

      5:18

About This Class

Whether you want to:

- build the skills you need to get your first Python programming job

- move to a more senior software developer position

- get started with Machine Learning, Data Science, Django or other hot areas that Python specialises in

- or just learn Python to be able to create your own Python apps quickly.

…then you need a solid foundation in Python programming. And this course is designed to give you those core skills, fast.

This course is aimed at complete beginners who have never programmed before, as well as existing programmers who want to increase their career options by learning Python.

The fact is, Python is one of the most popular programming languages in the world – Huge companies like Google use it in mission critical applications like Google Search.

And Python is the number one language choice for machine learning, data science and artificial intelligence. To get those high paying jobs you need an expert knowledge of Python, and that’s what you will get from this course.

By the end of the course you’ll be able to apply in confidence for Python programming jobs. And yes, this applies even if you have never programmed before. With the right skills which you will learn in this course, you can become employable and valuable in the eyes of future employers.

Will this course give you core python skills?

Yes it will.  There are a range of exciting opportunities for Python developers. All of them require a solid understanding of Python, and that’s what you will learn in this course.

Will the course teach me data science, machine learning and artificial intelligence?

No, it won’t do that – All of these topics are branches of Python programming.  And all of them require a solid understanding of the Python language.

Nearly all courses on these topics assume that you understand Python, and without it you will quickly become lost and confused.

This course will give you that core, solid understanding of the Python programming language.

By the end of the course you will be ready to apply for Python programming positions as well as move on to specific areas of Python, as listed above.

Who this course is for:

  • People interested in programming who have no prior programming experience
  • Newer Python programmers who need a refresher on Python
  • Students taking a Python class in school who want a supplementary learning resource
  • Programming hobbyists
  • Anyone else who is interested in learning Python
  • This course is NOT for experienced Python programmers

Transcripts

1. Course Intro Video: Hello. Welcome to Peyton. Programming for absolute beginners. This course is dedicated to clear up your fundamentals. My name is people too. And I'm the instructor of the course. I am dedicated to make premium quality courses, which is also reflected by the hydrating from my students. So what are you waiting for? Let's jump to the world off, bite on and start learning. 2. Lecture 01 How to Download Anaconda: Hello. Welcome to my first video off my course on Beytin. In this video, I'll tell you how to download Anaconda. Bite on for our course, so go to Google and type Anaconda fighting. It will soak up some sedation. Just click on Anaconda, Bite on now just go to Anaconda bite and website. When you go to the website and click on download, you will see Anaconda installer Page will come up. No, use the various options to do that. You have 64 bit bite on you have 32 bit bite on You also have Brighton 2.7 off 32 a 64 bit respectively. But we are interested in 64 bit because my computer is 64 bit a computer. You can you start to beat also, So just click on 64 bit and anaconda downloading will start at the bottom of the screen. You can see anacondas downloading after it is downloaded. Just double click and install this software and you will be done. Okay. All right. No. After installing, you'll have a shortcut called Anaconda Navigator on your Dexter. Now, just typically conduct next up shortcut and Anaconda will launch. Now, as the software is launching, let me tell you that the reason I'm using Spider is because it has already all the important packages building inside beytin. So you don't have to worry about downloading Package is going to come online. And doing all these things special is good enough. It it is having all the important packages just required for the course and for your work. That's why I'm going with Anaconda Spider. So now the software launches This is the logo for Anaconda, which stays initializing. That means the software is launching its a bit heavy software, so it might take some time to launch on its first start. Okay, so this is the window for Anaconda. So let me do a full screen, Okay? So let me go through this software real quick. Now, in Anna Gordy, we have different type off software's. We have Jupiter Labs. We have notebook. We have beauty console Spider Ardent. Our studio is with studio and so on for our course. We're interested in Pinta. You see, it is a scientific beytin development environment. Okay, so to open this, you just need to click on launch and you see launching spider with sure and loading screen will show. After this the spider suffered. We learned. You see, you'll get off screen saying Spider three. It ensures all the important point. Now this is the main window off Spider. You see, I'm using beytin 3.7 version in Spider Window. Let me go one day one. So this is the region where we write our biting cord and this is the region where we will get are are put So basically ah, when you will see bite and tutorials everywhere in Internet which the doing common line Basically, they write the court here in this console window This is the command line invited. But bend you are doing some advanced programming. You have to write scripts. So basically, in this course, I will try to focus to write fight on in a form of scripts because ultimately doing common land program won't help you much. Whenever you're doing any kind of analysts or any kind of bigger programs, you have to write scripts and you have to connect different scripts depending on your work , too. Get your our desired results. So that's why I will be focusing on using script to teach you Python. And then later you can go back and write the same court in the console window also. So that is not a big deal at all. Okay, that's all for the first video in this video, we learn how to download Anaconda Spider and install it and run it. And also, I told you a brief introduction off the interface of Spider, which we will use in our fight on course. So thank you. We'll see you in my next lecture. 3. Lecture 02 How to download Python on your Phone: Hello. In this video, I will explain how doing start fightin in your phone. For example, I will show using my android device. You can do the same in your iPhone or whatever device you have just opened placed or are after in your phone this tape beytin. You'll get few situations. I'll go with the bite on three i d. So if we open the app, let me click on install. If we see the details in the time it is being installed, you see that it has a lot of feature. You can go through the feature one by one. You see it has an offline bite. Entry points that an interpreter. No Internet is required. There is a great thing. It also has a peak BHP package manager and so on. So the thing is, you can use Brighton in their phone and install packages as well as you condone your scripts, everything from your phone itself. So, along with following the tutorial, for example, if you're veering my tutorial from your app, you can always switch between fightin and you do me app or whatever you're using to view my Victoria and then you Spuyten to do the same program. Now I'll goto open bite and 3.1 on this kind of window will come. So basically fighting will install it will tell Like like few seconds to competed. So after a great man. So you get this kind off window. You see, this is the script window, which I used in my tutorial. So if I write sprint Andi, if I write hello Okay. Uh, if I click on run, you see program finished. Now you say is hello. This is a great great I'll go back. Let me do a few more thing. Let me right Ache was do five less nine. Okay, then I'll write reigned Hey, So according to what should you print? It will print Hello and then 14 night. Let me see. You see that police. Hello 40. So this in this tutorial at least I can show you that you don't need a good computer or anything to learn by your phone. Your basic phone or flagship phone. Whatever you have is good enough to run biker. Okay. Thank you, Siri. In my next video 4. Lecture 03 Basic math operations: Hello. Welcome back in this lecture we were study about the math operations in by time will use both the command line and using scripts. Okay, so let's start. So at first, let me create a new file. Now, this is a small tip to you all. Always create a new file. When you're doing any new problem. Be the problem. Be small. A big program, a 10,000 line program on one line program. Anything. Always create a new file and save it. It's hardly one guy. Be right. You see, the size of the file is one kid, so it's totally cool. Just always scared of file keeper. Track off whatever you are doing and the save it. So name it as l 03 for lecture three and Matt for math operation. I'll click on save. Okay. So how do you do math operation? Remember that I told you we have multiple options to write in by the now. This is the script window where you can write a script and then printed. And this is the console window. The command window where we can directly in put commands and executed. Let me explain you with an example. So let's see a few math operation. For example, if I write three bless three and press enter in the console window. See, this is console window. We get six. If we do a three by three regained one to see all the basic math operations can be done in concert window. Now let me do three minus four, which use minus one. So we see that all the basic operations can be done easily in council window. Now we'll use patterns script to do the same thing. So basically, really script to do the simple math operation. So how to do that? Simply type sprint open bracket. Now this directly type three bless three and just click on drunk. You see, three plus three is six. Now let me do three by three Instruct Plus I replace it by three by three. Now, in fact, we can run. Look in this region it will throw the output directly confront you see that bodies One. Similarly, if I do three minus for and I run the same file, it will give the output minus one. So you see that using two different techniques, we get the same result that is six in both case, one in the both case and minus one. So the results are consistent. Okay, so this is done. Now we will do slightly more difficult, Matt operations. And I assure you how by 10 actually works in that case. For example, if I write for into Bracket five, less seven bracket less then and I pressed enter, it will give their result. Okay, so five plus seven is 12 into four is 40 Understand? Is 50. No, I just used the same code here. If I write print and the math operation and click John, you see, I'm getting the same output. So even if you have a complex math operation, we will get the same reserved both in script as villas in concentrator. So for my sedition, I've suggest that never to use the council window, it's always better to use script because your files are already saved. You see, from my last lecture, I already have saved my file s lecture to hello dot b y When I've saved my command. But if we write in console, it's like, very difficult. You lose all your data. For example, if you want to clear all the data and the log it will get cleared to see. And now you cannot drink over the old data. So this is the trouble. Always right in a script. Okay, So in my next lecture, I show you how to use theme at operation in saving in a form of variable and then using it . For example, if you have a math operation, say x one, you and you have another Max Matt, Operation X two. And you want to use theme at operation multiple times in the same piece off court than have you do it. Really? Write the same operation like this 1 10 times? No. You can assign a particular Matt operation such as this one as a variable A or B or C, and it's simply right brained. Okay. And it is similar as writing print and then the equation, so we'll get more into it in my next lecture. Thank you. 5. Lecture 04 Variables and operations: Hey. Hello, everyone. In this lecture, I will explain about variables and operations. So let us jump back to Spider. It's at first or to do is let us create a new file and I'll save this file. Aziz, As you know, four lecture for very of us and hit. Enter. So what are variable sent operations? Suppose you want to do a big are present, say, after four multiplied by seven A big number plus a big number Andi. Okay. Plus 57. Something like that. Okay. And you need to print this soul right print. And then I would nt bracket and I will keep control. So the some came out to be this value. Okay, Nice. Now what to do? Insert golf printing this thing? What I do is I would define variable a as this and I will just write Bring a okay, an effective con run. You see a good the same result. If I do, then times a I'll get same results. You see, it got multiplied by 10. No, we can do the same thing in conserving toe Also, I'll explain to you. How do you do that? So you write Let b equals two five plus six. Okay, breast Enter now. If you take be and then press enter. You see? You get in our put 11 again. What? I be entered. You get 11. Let us define a new variable. Say c which is equal to 22. Okay, so we defined to see as 22. Now, if we do see by V and press enter, you get output. Duke. Why? Because B is 11 on DSI east ready to? So when you do see by B, it's 20 to do it. 11 which is two point. Oh, good. Okay, awesome. A quick tip. I need to tell you guys that if you want to commend the line just print hash. You see, all the lines are getting bent out. If it we can't run, so those trend lines will not remain active. Okay? No. Let me give you some examples how this things works. That modifying X as equal do then, okay. And why equal do under Colon Messi? Fine. I'm zed equal. Do seven and an equal seeing are seven. No. Okay, let me show you. How can you print all these things? So if I click on if I dive rather brained X And if I run you see I get then if I print why there is a little messy If I type to see and then run you see about 47 and if I type m and run, I get cr seven. So this is a very basic example Where we see we have numbers. We have also our text and name also a number and a text, and you can simultaneously print all of them together. By that, I mean, if you die, print why and then bring em both off. Them will be printed together, you see. So this is the very basic example off variables in beytin. In the next video, I'll give you a few more examples on biting variables and almost all the combinations in which fighting handles the variables. Hope that will be useful to you all. So see you in my next lecture. 6. Lecture 05 Introductory concept on strings: Okay, here we have a very interesting lecture on this lecture is on strengths. The strings is basically a name, a text or sentence and so on. You know that, right? What is a string? So that me, right? An example on Show you how I turned. Differentiate between a string and a number. So let me just write X equal Do 56 and I will write print picks. So for this output the output is 56. You can see that. Okay, awesome. Now if I divided by X by then what should I get? I'll get X equal to 5.6 Very start Likud 56 by 10 is 5.6 now. If I divide define X in terms of string So how do you do that? I'll write str and put a bracket Now X is a string If a click run you see there is an error . So what is going on? It says unsupported operating type string at in teacher. So what happens is that now we have used str function. So X is a string Now we were dividing a string by 10 which is not valued right. We're dividing a string by a number. What happens then? Nothing will happen. So if I divide a by then So this is invalid, right? Because is a character and 10 is a number. Similarly, in this case, you're issuing air. If I pray Brent Knicks, we get 56. So this is how a string, uh, it's made from India. No, they're more points to it. Not if I write X off zero, it will print five. And if I bring except one, it will print six. And why it is happening? The idea is that if you have a string, then, um select x b a string, OK, I'll divided into a fall of their box. Let the name be Throw it. The three biting books is that it will name each character as an indexer to start from zero than one, then two, then three, then four and so on. This is how it works. I'll show you in a moment. So if I write x equal, do a B c d e f Okay. And if I write X off teachers So what should accept three give as an output de right, because is zero. Then be then see Dante. Similarly, if we do excel four, it will give So this is how springs work inviting. You can always convert back a string to an teacher by writing in affects. So I suppose Ah, what happens is that you were running program, but we have str off 56 Something like that. So now X is a strength. If you write, why equal do Oh fix And you write why you get 56 the harbor check. If I is a string or a number were divided by then. You see, we get 5.6. That means why is converted into Indy Jer from the string now why is a number but X is a strength. Okay, so this is done. Let's move on. Do some another part. For example, if I have X equal do Hello. Every one okay. And I want to print Hicks from Duke. Do Fife. What will happen? Extra u c l o is printed. What happened is that No, we have X is equal to 2 to 5. Okay, So, uh, hair, if you see this is zero. This is one. This is 234 from 2 to 4. It will print, excluding five. So if I do do do four, it would only print to end three. So it will paint the two l u c. This is how it works. So I will end this video here. And in the next video we'll go deeper into strings and I will show you various expressions . For example, if we have a sentence how to turn the all the sentence into capital later, All small later are extract a portion of the string and so on, which could be used useful for your program. So good bye for now. See you in my next lecture. 7. Lecture 06 Introductory concept on strings 2: Okay, so we're in the second part off the electricity's for strings. By the way, let me tell you that in all of the lectures, after every lecture, you'll get quiz in that quiz. Your concept for every lecture will be checked. So do at in the quiz. It is a strong recommendation that you hadn't the quiz. In case you find difficulty to solve any of the problem in my crease, you can drop a text. You can send a mail. You can follow me on the social links in everywhere I r line. So basically, we'll get to reply in probably 12 hours, so that is totally fine. The links will be there in the P way fail which I would send you in the form of resources. So let's begin. We have a new file l 06 strings. So let me define, um, very but a and let me write or text. So let me write. I be on replace, Be with it. Okay, let's see what happens. See if I replaced be by age in every location. Wherever there is capital be, it will be replaced by capital it So this command is useful when you want to replace a particular character. Okay? No. Suppose that you want to split beach a word into a separate, um, variable are apart off in any how to do that? No, What you can do is you, right. Um a dart split and you give golden and you see what it does is that the split command will check if there is any coma, and then it will difference yet the text. So if I remove it by a space and then run you see, I get a desert where each word is separated and it forms. And Eric So what I mean by that is that if I right here, b equals to let me just copy this. And then if it might be off zero you see, I get output. Please. Because B is actually containing four different words. You see one do three for Do not confuse with the index for each word in an airy, be off zero means the first element be off. One means the second element and so on. So if you use the command split, it is used to split the text. Depending on what parameters you were giving Okay, so we have understood that. Now let's say you want to check whether any particular text is present in an article or text or not. How will you do that? It's just like find in Emma's word, which you might have used. So I have a please write my course and then I'll write be equals two it in Hey print. Be So what this will do is I have heard explicit my course. And if the word rate is presenting a then be will be true else be will be false. Now if I click on run, you see it say is true because the rate is presenting a If I write something different se double e rate then it will give false because this is not present in a Okay, so can we add two different stinks together? Let's see, I have a preset makers on to add to it. Let me Right. Thank you as b. So how can we print together? Let me define C which is equal to a plus B and let me print See, with this work. Let's see. Yeah, it works are what we can do is we can add Ah gap, and then you can print. See? Then there will be a space in between. So simple addition can be used to add two different strings. Now we will discuss one of the most interesting part in fightin are in any of the programming language. That is how toe air dynamic text our dining number toe sentence. Let's say I define are Fife okay? On what? We defined a text be as a e a s e rate my course and then C equals Do start. Okay. Mm. So can we add off string and an Indies er together? No. Right. We have to convert the text, The letter the, um, string into Intissar art. It is interesting to add them up. So what we do make Oh, very well, Final. And we will say this is to be bless str uh, plus C and world print finding. So do you understand what is happening? So it will take be first and then it will convert five into string and then see So when I click on print, it will print. Please write Michael's five star. Suppose you want to change this value to four point three you see, Please don't make goes to 4.6 start. So if you have a big project where you need to change a section off your string, you just make ah so part off your string, then change the reason you want to do accordingly. So in this way, you can edit your string accordingly. 8. Lecture 07 Introductory concept on strings 3: Hello. We're back on the third video off the CDs for strings in fighting. So after this lecture also, you'll have a quiz in which your concepts will be tested. So let's start. I'll create a new file and I was said this as Ah zero seven. That may save act as an 07 strings. Fine. So in this video we'll learn a little different thing A little advance. Let's define a as for the S five. And then we would like to see as I it wrappers and bananas. Okay? No. If they have to rent it in a form that I need to change the values, how will I do it? So I'll do see dart format and then open bracket and then write a comma, be lose your bracket and then you're done. So when you run, you see or do get is that Oh, sorry, I it Yeah, I run this once again. OK, so I ate four apples and five bananas where I've defined a and b several variables. And when I click on when I write rather brained former a b that values get inserted in this brackets, it can change. Do then if you're healthy enough, toe eat it. So I didn't apples and five bananas was You know that you can add an index. So if you want this to be one and this is zero and if you're right, you see the opposite thing happens Now, this will take the value a and then this is one. So this is be so. I ate five apples and then bananas. So let's continue with a few more examples. Um, in the next example, show you how do capitalized the first later off the sentence. We generally do that right, so I'll just modify it a bit. So let me try. Deke will do Just sentence. Now you fire right de dot Capitalize and then run it. You see, the first letter is capitalised on. The rest is small. This is the function off capital A's and one more feature is that you can count the number off character repeating in a sentence If I d dart count and then e if I run it, it gives for What does it mean? It means that whenever ah, this command actually counts the number of times he appears in the sentence to hear this. 123 and four. Okay, so what next? Okay, the last one in the seas is the index. So if I write did out index and then e, it gives one. What does that mean? The index actually give the position off Decatur E when it first encounters in a sentence. You see here, e happens at one and then later are different values. But the first time it will encounter in a string, it will give the index value off the digital. So we'll see one more example. Let's take Yes. Okay. Mistake this. If I run, it gives five. Because it is 12345 This is in fifth body genders by the index's five. I hope you know you understood the string properties and the operations. After this lecture, you'll have a quiz. And that grease. There will be a lot of questions you can tear appear concept on. We'll see you in my next lecture. Goodbye. Daycare. 9. Lecture 08 Input and Output introduction: blue in this lecture will talk about input and output in Beytin. It means that whenever you're running a program, it will take some input from the user who is running the program, and we'll get output accordingly. So before we jump in, let's create a new file on Save It as input output and see no, the way Beytin takes the input is by using a function card input. So when you write a sequel to Input and you run the program, it will give up, up, up where you have to type where the very input you want to give my default input takes a value as string. But you can obvious convert it into an teacher. Are some other former whatever you're comfortable with. For example, if you want to take input as in teacher, but you have to do is you're right, I and D and then open a bracket. You write input and then enter uh, number if right equal to this, that means that whatever input you are giving it will come get converted into in teacher. So basically, the input is always a number on the street. Awesome. So, no, that's good. A bit and see, uh, how we can do this kind of problems. Let's see. I right edge equal to input. Enter your edge and world, right friend in 48 years and then edge. What happened when we run this? Okay, LeSage? Yeah. Okay. Nice. Because I forgot to give up less because it is a number. You see, I get ah, pop up where it is asking me to enter my age. So if I write, my age is for and hit enter you see, what is the output out? But is the input age is for similarly Um, the problem is, this is a very and once again. And if I write a B c, it will print, Then put ages ABC which is not correct. So how do we fix this problem? We restrict it as in teacher, right? And and then we write print age. So if I run this veil now, if I write a B c, you see it will show some error. Why? Because now the edge will take only in teacher. But we're in putting a string to successfully run this problem. You have to in input in number, not a string Okay. Here. I made a mistake. It's because you see, we can add in teacher to a string. Right? So the way to fix this is but a comma. Because this is a string. This is a number. Now you fair. Ron, if I write 24 you see the input age is 24. So this is how the input and output statement works in pipin. So in my next Lector, we'll go deeper and see a few more examples about input and output function. Good bye. See you in my next video. 10. Lecture 09 Input and Output introduction 2: Hello. Welcome to another video on input and output. So in this video, unsure you a very basic example off how input and output is useful. So let's start. Suppose you want to make a very basic agreement which multiplies two numbers. So how to do that? So I'll write a will do Cand input in a number and then and all right once again as b enter another number to multi play. Okay. And what I do I'll just print Deep project is and then calma a multiplied by B So if I run it to last for a number of type, then into another number two monthly play on 20 you see the product is 200 this two very far Let me enter. The first number is four second number is for the productive 16. This is how a simple calculator is made. Now you can and addition substructure and division and all those things and you can put conditions such as if you can run a loop which will do in our letter lectures. So let's end the input in our port lecture here on we will move further into loops in our next lecture. Goodbye 11. Lecture 10 Loop introduction: Hello in this lecture will talk about loops in beytin. So in this of remains, you can see that you have a loop. That is so. You have a condition here and you have a conditionally cold. Now, if the condition is true, then it will check the conditional court. And then it will run the system once again again will check the condition. If the condition is true, then conditional cord. And then again. And if the condition is false, it will jump back to the next length. For example, suppose you have, Ah, a few lines of court in a loop. So this is in a loop, and then you have fuel ends at the top two lines at the bottom. So when the condition is true, it recycled back and forth between this loop and then the condition is falls. It will just come to the next plane and then proceed toward the program. So this is the main idea behind the loops. Okay, So what are the type off loops we have? We have my loop for loop and nested. Look, what is my look? My look repeats a statement. Our group up statement while a given condition is true, it does the condition before executing the loop body. What is far? Loop it. Execute a sequence of statement multiple times at everywhere Decode that manages the loop Variable nested loops you can use more are off one look inside any other while for are doing Elect Mitali for Luke is the most widely used loop in fighting Generally as far as I know, we birds and prime used by loop also And Nestor is very, very useful in complicated problem. For example, I accede to draw this pattern. How will you do You need a nested loop for I for going down and then j for moving this with something like that. And what are the control statements in fighting? So the brake statement, It's basically help you to break a loop. Suppose you have a five line gold. Okay, so if you place break here, it will just got the next two lines and move to the next set. Of course. So this is the break statement. It terminates the loop statement on transfer execution to the statement immediately following the so if you have a break here, it will ignore these two lanes Good evening statement causes the loop to escape the remainder of his body and immediately research to consent prior to its creators. So again, no. Five leg. If you place continue here, then what will happen is the program will run. It will see there's a continue here and then it will move up and then it will come down. So continue is actually like a mirror which reflects backs. You can think something like that. Bostick Hman. The par statement in Piketon is used when a statement is required. Syntactical e but you do not want any command, our code to execute. So it's basically like, Ah, a new statement where you have a set off court and it is required by the program. But due to some reason, you ask the court to pass their statement to the next set. Of course. Okay, so that's it for the introduction for the loops. Less jumping on dsi. If your example and there's learn how to write loops in Brighton. See you in my next video 12. Lecture 11 For Loop: Hello there. I've already created a new file guard loop for that B y. So we'll jumping to show you a basic example with for Okay, so let's start by writing numb equals. Do one do 34 maybe 12 34 66. Okay, just few ran numbers and I right for X X is the loop parameter. I will experience a moment been numb and this is the symbol you have to write. And then I arrived. Print picks Let me explain to you one day one So this is a set off number that I'm taking us input I write for which is for the loop and then a right X you could write Why's your name? Anything? Okay. And at eight. X is in number Fine. I write X is in numb drink takes Now I say that whatever number is there, Let X be that number and print all of them. So the loop Children 123456 Loop it on seven times. And then these seven elements will be printed when I click on print. Exe. I hope this is clear. Do you are? And when I click on run, you see, all the numbers are printed. Whichever numbers are there in this loop. So let me take some. Another example. If I write, say, one comma 70 comma, 100 comma 34 and I write Run. You see, the same numbers are printed. So this is the most basic example with for Look where you have an Eric. By the way, this is called an area. Um, what it means is a single variable can have multiple numbers. So now, um, let me talk a bit about area where I write. Bring numb in bracket zero and click on run. You see, I get output one. That means this is a position zero. It will return one. If I write three, it should return 34 because the 0123 see that produced 34. So this is how it works on, uh, let us go through a different example. So now we'll do a completely different from afar. Luke. For example, if I write for X spin range 15 and then remember, you have to end your line always with this. Don't forget this. Okay, Good for X in jeans 15 and print. Exe. So when I click on drunk. You see, all the number starting from 0 to 14 are printed. So remember, dirty for arranges 15. It will print one less number 14. So if trains five, it would be 01 could see for just like that. Okay, Now a slight different examples. For example, we want to print number between a particular change. How to do that now, If a night five coma then and then click on run. The number will be printer as 5 to 9. So what happens is when you write reigns a comma be Then it will print a A plus one a place Do still be minus What? So this number will not be printed? This number will be printed so remember this. Okay, this heart books. Now suppose we have ah, more demand again and you want to bring in a particular pattern. So suppose that you want to print, you know, get for example you want to bring in a given drained and in a given separation, for example, you want to print 5 20 a gap off five so clinically confront what happens is it will start from five just that on with the gap of five, it will pray until 20. So if we're right, do here It will print five with a gap off. Do do any number less than 20. So if you write seven here you see, you have been 5 to 11. 19. If you're right six, it would be 5 11 17 It will not print the next number because the gap is six. Okay, so let's jump into our next example. No. Suppose that you want to bring the square off given large set up number. How do that? So you have a set of number. Say one. Do 34 56 56. Okay thing and how to bring the square off all the numbered ones. So you write for X in numb And then what? And then right brained big star ex. It's so easy. So what you have is you have the number input number and then we had the square, all the number. So, for example, your given an extra seat off 10,000 numbers on you have to find this square. You can't do that manually, right? So just for an example, you can put the numbers here. We can print on Do all your analysis and calculations. This is how it works. In my next lecture, I'll be explaining why Loops take your goodbye Syrian, my next lecture. 13. Lecture 12 While Loop: Hello. Welcome In this lecture we learn why Loops? My lips are quite easy compared to four loops, soldiers began. Suppose we write any quarter to five and then we die divided n greater than zero. What will happen next? I will introduce end by one any core do in minus one and then I'll print. And so what happens is that I've defined a number n And then I wrote, If N is greater than zero, then run this loop. If it is less than zero, then proceed to the next line is the purpose of my love your square simple while expression while expression. But for for Luke for a number in excited. Then the loop happens that there's the major difference between the two. Okay, fine. So we have an equal to five. When I run this, I get an output. 4321 zeal. So when it has zero minus one reaches minus one and that is not true, there's white. It's not getting printed. Okay, So, for example, if ordinary anger than minus four, so it will be in four to minus four on anything less than minus. We will not be printed so once again you write while and then just the condition at inside here, whatever loops you have, and then you and the loop like that. So this is why Lou. Similarly, for example, if any girl to one and I write in is less than four and any guardian plus one so up till where n is less than for it will keep on printing and see. So an empress 1234 And since five is good than end, this is not valued than the loop. And at four. So this is the basics off my look. In my next lecture, I'll go in detail about nested loops, which will be interesting. Okay, See you in my next lecture. Goodbye. 14. Lecture 13 break Loop: Hello. In this Lecter, we will learn about the break statement in loops. So let us start with the example, because every time with example, it is easy to understand. If I write far van in by 10 and then I write if fan is Mm. Then break print Well, and then at the end, let me write. Grinned. And okay, now if I run this Oh, Gaby, guards done issues was probably uprooted for God. Yeah, this is fine. Okay, let me explain what's happening. So here I defined a loop and I said, If Val is in fighting fell basically at the individual characters in the string Brighton And I said, If vell find sent hole, then break the loop. So let us see what happened. So when Valley Speedy, it will pass and it will print be fine When we come by, it will print de it will drink may this each it will print. But when you get an o, the statement will break the loop. Remember? I said that break breaks the loop. It will break and then jump to this lane. Always remember that in fighting the symmetries maintain so the far look inside the for loop means there will be a space here in center. Even if you see, there's a space here. So in general, this is maintained. So when you click on Breck, it breaks the nearest look that is the this region. And then jam stood up Drink, end section. So this is how a break works neither to see another example. Let us right for X in range. Let's say then, comma ready faith. And then we friend x after that, the right if x he's, ah, next spring to less number. Otherwise, you know the window will get filled up. So they're spring Teoh, maybe 16. Okay, now, apparently, if extra critical 13 then Brick. Okay, so this is my statement. Let's see what happens when I click on round it. Prince. 10 11 12 13. Now you have to understand what is going on here. So when X entrance tend to 16 means that it will have 10 11 toe there, Dean 14 15 and 16 and my prince treatment is above the if statement, so it will print and 11 will find when X will take 13. It will print 13 and then it will go inside the loop There's by the number off prints are for now. See what happens when I take the Prince statement after this, if statement. And then when I click on run, you see, we get an output with these 10 11 and 12. But here we go. 10 11 12 30. What is happening now? Let me again. Right the numbers. So 10 instantly find 12 is fine. 11 is fine. No, When X is 13 it goes inside the loop. Remember that now parents treatment is below if a filled run fast if executed. 13 break. So when X is 13 it is breaking the blue and the cursor is coming to the end. That's why this is not printed. That is the reason why we have. They are put 10 11 and 12 and not Turkey Artist. Therefore, the position off your dream statement plays a significant role when you are according are repairing some kind of algorithm. I also know that this I have shown a basic example, but this is very useful. For example, if you're running a complicated program with maybe many nested loops and you warned that if the number reaches, say, 5000 it would break the loop. So what to do this strike if X record of 5000 also break? So this is quite useful in Beit major programs. Okay, that's it. So this was the quick lecture on break in. My next lecture are discussed about the continue statement. Thanks for watching and see you in my next lecture. 15. Lecture 13 continue statement: Hello. Welcome in this lecturer. Discuss about the continuous statement. As you can see, I've just replaced the same program with a continue statement and we'll see what happens when I click on. Continue. So when I click on Continue my great and are put off 13 14 15. So let's break down. Why? This is happening. So I have a loop. It should have 10 11 12 13 14 and 15 s output if it ran normally. Now what? Every tennis. If exist less than 13 then continue. So if if exists, 10 11 are two of it will come here and it will jump back to the loop. But when exist 13 14 or 15 this but will not run. So will definitely get the output there. So ever getting 13 14 and 15 as reserves. I'll show you another example. Suppose you fell right? Continue here. Or do you think what will be the output if I run this north with white? Because here his return for X in drained. And then there's a continue. So the Lupul come here and then it will jump. It will come. It will jump So this thing will go on because there is no if our condition a statement, let us move toe another example off. Continue statement. Here is another example where I've written a reinstatement before the continue and a prince treatment which is after the continues Jackman to have a better understanding off the problem. So when I click on run, what they have is that the 1st 3 output is from this treatment because we have one and then X and in this we have to do and then X. So when exist less than 13 this three lines are getting wintered, as you can see because this is the conditional statement, this thing will get executed when and after that When this is not running when X is greater than 13 then this line will get executed. So this is what is happening here. Let's look at another example in this example. Um, we're differentiating number between even art. So what do you have here? We have a loop westerns from 2 to 10 and we'll find the remainder with two. So that is when it is zero. Then it will be even, but the rest continue. Okay? And if the remainder is not Cedo then it will print this statement. So basically it is divided by two. This will get printed and when it is not getting diverted by do this land will get drinking . Also, let me explain you a conceptual part. Why? The new statement is so important. Suppose I have a far loop and I have 1000 line off gold here and then continue. And then another 1000 lines. Okay, so I tried to explain Your white country statement is so important. Suppose they were running a piece of code. Where? For even numbers. You don't need the set off court to run. So what will you do? You put a continue statement so that when the loop is coming to continue, it will go back to the loop. And then it was driven in this small program, human art Get a feeling about Vikan. Flu is important because even if you don't write, continue that, but will be same, right? Because if it is our than this language it, drink it. But imagine if you have a bigger Gordon and if you are writing continue, then the next 1000 line will not get executed so he will save a ton off compositional time while running this kind. Of course hence the continent's treatment is very useful. If you use it properly, it can save your time and resources. So this was just an example. Why can't district is important? Okay, there's jumping. So when run this cord you see, they found even number Do so all even numbers that is this lane is getting printed and when it is an odd number, this line is getting painted on. The continue statement will help it to jump from here with the loop whenever is encountering the continue statement. I hope this is clear for you are Thank you for watching.