Mastering Kotlin Programming Language for Beginners | Muhammad Ali Yasin | Skillshare

Mastering Kotlin Programming Language for Beginners

Muhammad Ali Yasin

Play Speed
  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x
22 Lessons (1h 51m)
    • 1. Introduction to Kotlin

      1:56
    • 2. Downloading IDE

      2:42
    • 3. Writing our Hello World Program

      4:21
    • 4. Intro to Data Types

      5:07
    • 5. Intro to Variables

      4:56
    • 6. Practice Variables

      5:16
    • 7. Intro to Comments, Val vs Var, String Templates

      8:15
    • 8. Get user input

      5:37
    • 9. Intro to Arithmetic Operators

      5:47
    • 10. Intro to Assignment Operators

      5:16
    • 11. Intro to Unary Operator

      4:55
    • 12. Intro to Comparison Operators

      4:42
    • 13. Intro to Logical Operators

      3:51
    • 14. Intro to IF ELSE Statement

      2:53
    • 15. Intro to Else IF Statement

      4:55
    • 16. Intro to When Statement

      4:43
    • 17. Intro to While Statement

      5:12
    • 18. Intro to For Statement

      4:16
    • 19. Intro to Nested For Loop

      8:21
    • 20. Intro to Break and Continue Statements

      5:57
    • 21. Intro to Arrays

      6:58
    • 22. Intro to Functions

      5:27

About This Class

Google is now officially supporting Kotlin in Android development. Kotlin is clearly the future for Java. Come learn it in this fun and exciting course!

This Course is for beginner programmers: We'll start off from very basics such as installing IDE, Java JDK and writing Hello World Program.

In this class we'll cover:

  • Variables
  • Data Types
  • Operators
  • Conditional Statements
  • Arrays and
  • Functions 

If you're looking to make Android apps, command line tools, Javascript, or just want to learn a new programming language, this is the course for you!

Transcripts

1. Introduction to Kotlin: you want, so people assume American Welcome toe Inter to Coleman on Industry Jervis gonna learn what is Scotland Now? Colon is a programming language Such a C C sharp javascript and songs over just a similar language on it was developed by Jet friends. Now this Jetbrains is the company which is the one who has created the Andrey Studio on Intelligent Idea and many other famous soldiers. Now this company has introduced Courtland in 2011 and certainly Google thought Wow, what a great language on it made it the official android Abdul Rahman language. Now Google has made what called them the official android app development language on Now you might be asking why Colon? I mean, it could be any other language. Why Coleman Right now, the simplest reason for you, as the programmers who don't have any basis in programming, would be it's simple. Now look at John record. It has, like 15 to 20 lines are on on the other head. Courtland has only six lines. Obviously you would go for Courtland and Colon doesn't looked really hard to understand it just really small, small pieces off court. It's really simple court asking for is not Jammeh is really long and their law off bolstered going on. So obviously the simplest and the most obvious reason would be that it's simple now. Other reasons could be no safety and other important things. But doubt has nothing to do with us because we are beginners. And we don't have to deal with those stuff for now. So basic and the most obvious reason would be Colin is simple. Jonah is hard. Okay, guys, that was all for Destro. And also in next trip. Bye bye. 2. Downloading IDE: your so people. A samurai taken. Welcome back on in this church, we're gonna be learning how to download the compiler, the program the I d. Using which we're gonna be learning the court language or in which place we're going to be writing or Courtland Cord so that we can well program. Now, there are two ways Number one you can obviously try and online Kampala in here. If you click on try, Cortland will get to this page where you can see that we already have a compiler bike, Oatman. And you can test your court in here because you're just touring, so you won't be doing anything complex. Okay, so your first option is this The second option that I would recommend is you download went off. He's not well, I won't argument Kampala at all, but I'll recommend eclipse or intelligent I i d. On. If you are into Android, then you would go to Android Studio. But I'm gonna be using the intelligent idea because it's the official product by Jeff Green's on its highly compatible with the language. Okay. From here, you can go to jet greens on. This is a community addition. I have the pro Virgin, by the way. So this is the Jetbrains website and you want to go for intelligent idea on from here you will go and download the anthology idea. Obviously this is not the end of it. You go in here, you down Lord, the coming to the Virgin on the ultimate virgin. You don't want to come into Virgin on done. You have the intelligent idea as I have it in here. But I have the pro virgin and you will have I mean, I have the ultimate version and you will have the simple Origen, That's what. Okay, now, after you have this Ah, what you want to do? After you have this, you have to do a simple stuff. You don't want to install it right away if you inside right away. No problem. You want to go for J d Care now by J. D. K. I mean the Java gvk Java development kit on. You wanna go in here and download the dollar development kit for your operating system? No matter what type off operating system you're using, Maybe you are using the total bit or 64 bit. Doesn't matter now in here. You can, you see? Well, it's the windows. Wherever. Accept the license and you want to just download this and you will be good to go. Now download this. Installed this on, then install the Sofia on. You're good to go. Okay, guys, that Russell for this trail and also in the next year. Bye bye. 3. Writing our Hello World Program: you want some people that some while you can welcome back and industry Trevor, you're gonna be creating or hello World Program, so less gets heard. So once you have open up your I d or intelligent idea you want to click on, create new project on from here. You wanna choose the Courtland on then Colin J. We, um Java virtual machine on then from there you want to choose the project name? I'm going to say, Colin, that's a quote. One would be enough on. I'm gonna just finish up this Predict No, in here. If you come in here, you would see that you don't have anything inside. So what you want to do is you wanna right click in the source file or only Sourcefire on from the right. You wanna choose Scotland file? Ah, You want a name? Your father as hell world. Maybe on okay. And you're good to go. Not this hell of world in here. Inside in here. You want to type mean once you taught me and it will give you an option. It will give you ah recommendation. You have a main function. You wanna click OK on. It will generate the main function for you. So this is your main function. If you don't get it and read it you and just type fun. I mean, let me type it for you. Just for the sake of the story is going to say fun, that man then Prentice's And in here and witnesses say our eggs Coghlan on a re than less than green. Sign that inside in here we're gonna type string, then curly braces and be a good tickle. So this is our main program now, inside in here I want to say print means Ah, pop out print means Give me the our footprint on inside in here. I'm going to say hello, world. How little world bond Regan of right clicking here and we're gonna bring the project. And now it's done building and it says hello world in here. So if I had tried something else let's say and then the world I'm gonna say print again on I'm gonna say End of the world on Rearranged this again and educ unsee It says hello world on After that, it says, And the devil Now, how can you get a space in here? Well, the basic or the simplest Reiz. Have a space in here and you will have expression here. But if you want to go to the new line, you get a type print Allen in the previous section. So what is the difference between print and print? Alan? Basically the print statement. What it does, it prints this court. It will print another world, but after that it doesn't create any new land. But the print Ellen. What? It does it. It's been a type or print out. Hello, world. Then after that, it's going to create a new line. So it goes to new line and here is gonna type the next thing that is end of the world. So let's see as we're gonna see. Hello, World touch. Hello, world. Then there is a new line and in the new line, this court gets executed and it's going to say and the devil now, as you can see after this cord, there is no new line. So as you can see, there is no new thing in here. New line, extra line. What if I type l and in here, then you will see I knew you lying so let me play this. And that's wait for a second on. As you can see, we get a new light in here. Hello, world than the new line, then another world than the new line. So if you break this into two pieces, it's gonna say print. So I'm gonna print this on. Then I'm going to create a new line after I printed us. Similarly, the second the second ah line, it's going to say I'm gonna print another world on. After that, I'm going to create a new line or I'm gonna go to the new line. Look, you guys that was old for this trail and also in the next trail. Bye bye. 4. Intro to Data Types : us up, guys. A semi taken. Welcome to this tutorial. And in this tutorial, we are gonna be learning about data types. Now, there are a couple of data types such as string integer on a double on Boolean and many other. But these are the important mints. Okay on. Actually, we had a chart to on. Now the string basically means the text. Now, suppose you weren't Ali Ali is a text, right? So it's a string on. Whenever you declare string or you wanna type or output string or use string in your program, you would use double court. So whenever you want to use text in your program, you would use public art on whenever you want to use number. You would say just a number on No problem. But when you have a number with a decimal place means ah dot then you would use the double . That's suppose it's nine. So 25.9 is a double data type. Similarly true or false is ah bullion day. At home, you can have two types of values in here. Either true, either falls at the value is not accepted. You can't say just maybe or no or yes, This is not accepted. You have only two values. True Awful on the charts You single court on tied the correct inside any corrector. A single corrector if you use a B than that is wrong. Sorry, this is also wrong. So that is wrong. You can't have double correct that you can only have a single corrector. So a string is a type of text whenever you want to use text, for example in print. Ah, you want to use text, right? So you would say Ali. But if you want a friend a number, you would only say number. You won't use thes. You won't use these. Okay, now, if you want to use double, you would say 25.5 on. You don't need to use the double courts. Double courts are only used when you wanna talk about or whenever you wanna use the text on bullion, No problem you use true or false. No problem. You don't need double court at all on for the corrector you need on the single court. Now let us actually have a practical look at it. So the first thing we're gonna do is we're gonna create a new file on. We're gonna call a data type file. Did, uh, types on inside here? You want to create a mean program on inside men Program? You wanna say print Ellen on inside in here? You want to print your name? Maybe you have, uh, George as your name, or you wanna print your ears so you're going to say different. Oh, and 25. Then maybe you want to print something like, ah, year Berthier. So you wanna say print? Oh, and birth hair is 2018 minus. Uh, let's suppose 25. Right? So that would be your Berthier. So let s Prentice and see what's gonna happen. Well, the hell I don't see anything. Why? Well, because we ran the hello world. Don't Katie rather than their time start. Katie. So right clicking here. You gotta run this in here. No Dallman. Now you see something strange. You type 25 25 25 but you type 2018 minus 25. It came out as it is. Why? Because you are typing a number as a string so it won't change. It will consider is a correct us a collection of collectors on it won't consider it for calculation. Now, if we take these out okay. On a let us run this again Room. You were born in 2019 93. So the re you can do calculation is by having the data type as a number integer or wherever , but not as string. Right then after that, we have the bullion prototype. So bullion is basically saying true. Okay, on after that we have the corrector single court. See, it will print the corrector. But if you ah, type A B, it won't print it because it will say I only need one corrector because you said with single court so single court, because it can have only one characters. So you can't have more than one correct in single court. OK, guys, That was all for Distrito Riel. And also in the next trail. Bye bye 5. Intro to Variables: here was the people at some recon. Welcome back in this tutorial, we're gonna be learning about the variables. Variables know what are variables? Video from or mathematic? Last are ax equals training? Five. Right ax equals 25 on. Obviously why equals 30. So we know that ax place. Why result in what oversee 25 place 30? That is equal to 55. Now, that is not the question. The question is that axe is basically holding. The value ax is a box that is holding a value 25 on advise and another box that is holding a value 30. Now this is variable. This is a very evo in programming. These are variables. Basically, when you say that ax equals training, five variable is created. But before that, you have to tell it the arm creating a variable not just acts equal 25. You have to say of our I'm creating a very well called X equals 25. So it's called acts and it holds really train for now. Let's suppose I have a very bulk hauled name on it holds. Tell me. Obviously we remember from the previous tutorials that there should be to petition marks. Now in Kaufman, there is really a great practice that is var X colon end is equal to 25. Basically what it means that you are telling Courtland that acts should Onley except the integer value. It shouldn't contain any other value. So if you write instead off 25 right, 25.5 is Genesee. It's incorrect and it's not going to compile it or it's not gonna rent. It is going to say this is incorrect. So con trained it. Obviously, if I go and save our name Andi, I say it is off type of double on. Then I type Ali is going to say whatever you enter in here, it doesn't matter to me. You said it's gonna be double. That's why this is incorrect unless you make it string. Okay, so let's go and check it in practice and see how it's gonna work. Okay, so let's come in the source and right click, and we're going to create a new file Courtland file on. I'm gonna call it variables. Variables on a new file is created. Obviously I need the main function. So if we get the main function on. We closed down the window. Now, in here, I'm gonna say far I'm creating a variable called Axe on It holds value 25. Right. I'm gonna print X. So if rear end this program now, after clicking on here on saying, run the variables that Katie, you see that we get 25 printer. Now, let us create an under verbal. But this time I'm going to specify the type. So I'm going to say of our VAY is off type string on it. Contains it should contain 25.5. Now, you see that there is some air in here. That's why it's underlined rent. So you can't drink this if I try printing. Why? Okay, this reacts. Let's print. Why by itself, So print. Why on if I try and render us now, it won't. Friend, As you can see, it is giving me her on. More visitation are gonna work. It's not working. So what is the way to correct this error? Obviously you take out the 25.5 on Put love in here. Love on. Now you see no hair because it's saying that why should be off type string right then it goes in here and say OK, it is of type string. That's why there is no problem. Well, a call comes in here now, if you try to rent this, you're going to see that there is no problem in this court. So it against 25 bluff obviously didn't to put Ellen in here. That's whether is ardent port. Sorry. That's why there isn't. Ah, new line. But that's what I mean. This is how variable works. Okay, guys, that was all for district urea. And I'll see you in the next trill. Bye bye. 6. Practice Variables: you also people Assad while Deacon. Welcome back on in this tutorial, we are gonna actually practice the variables so less get started. I'm gonna create a variable called my name on. I'm gonna say it. Is it culture 25? Oh, are well, my name. Maybe Ali. So once the hell I just brought everything correct, right. Well, why is there space when you're declaring a variable? Remember always that you can no have space. Okay. So either way, if you want space, you can put underscore in here on. It will work good too. But you can no have space. Number one. Number two. You can use the camel, Cassie. You can say my name. And as you can see, it's more readable. My name number three You can't start rid. Ah, underscore. But you can start with the number you can say to my name, right? No, no, no. You cannot do that. You can't say Ah, double court my name or add the re off my name. No, you cannot do that so you can only start within the scope. Okay, now, let's say weren't my name is Ali on of our I didn't specify the type, So I'm gonna specify type in the other one. I want to save our age my age Gonna be off type into ants Finish here 23 this time Var gender on I'm gonna say it's off tar type Char char on it is male, right? Let's of war Is married basically means are married on it. This is going to be off type Boolean on. It's gonna say false. I'm not married. Now that s print this information. I want to say print in here. I'm going to say my name is married. Plus is married now what I'm doing is I'm seeing that first type is married. So first print out is married, Then print out the value of his married. So is married. Well, it contains false right, So it's gonna say false. No. The plus means that after this you have to put this, That's all. Now they're surrenders and see how it's gonna work on. As you can see, it is Ali training three Male is merit force. Now, let's suppose let's make it a bit more exciting, right? I'm gonna starve it. Ah, Name? No, it s spring. This so name Ali. A strange three agenda male. Obviously, I forgot the colon and spacing here. My mistake. But it's working right now. How about I make it a single line? I can just Stewart something really crazy in here. I can say, Let me bring it down. I can say Name my name, then I can simples. It's then I can say Pleiss age Now, If I run this, you'll see that it will contain one single problem. That there is no new line. So as you can see, it's on same line and it is no good. Now, toe. Oh, overcome this problem. What you can do is you can type something called slash and so if before age, you put slash on on four agenda, you put slash on on before the is married. You put slash on on a run this. Now everything is on Nuland, now slash, and what it does is before age. It's going to create a new line. So before age, there is nothing. So after elites creates a new line before gender, it's creates a new line on Before is married, it's going to create a new land. Now this is called escape sequence, so You got to remember that whenever you need a new line, you can You don't need to go on to create a new printer. And rather than that, you can say slash on and you're good to go. Okay, guys, that was all for this tutorial. And also in the next trail. Bye bye. 7. Intro to Comments, Val vs Var, String Templates: you're also people a Semicon. Welcome to this tutorial. And in this tutorial, we're gonna be learning about comments, var and Val difference on string templates. So let's get started with. The first thing you want to learn about is comments. What are comments? Comments are basically text that you want to put as reminders or as nor taking whatever it is just a text that doesn't get compiled. Let's take an example on. One example is that we have this greed are texting here. If you read this program, do you know what's gonna happen? This text is not going to create any problem with the court on not going to get compiled or not gonna do anything. It's just a text. It doesn't have any interference with the program. Let's suppose I rent this program. And as you can see, there is nothing in here. Why? Because this means nothing. Now what is going on here? Simply if I put a double slash in here on type, whatever I want, whatever I want what ever I want on as you can see, the thing uh, compiler doesn't give me any error. Nothing is happening. But if I remove these slashes in here, You will see Wow, I have ever seen here because what is not a key Vered Because it means that it's not being used by Colin. So the compiler intelligent idea doesn't understand what is were keyword and what is? I keep word on these keyboards. Basically, it doesn't understand what is going on in here. So because these are English words on these aren't used for communication. No taking and so on suffered for academic purpose or speaking purpose. So we don't When we put the slashes in here, we mean that this is for us, not for the program. So it's not going to compound. The other thing is supposed as you can see, I have ah, four lines in here, right? So every time I had to talk, double slash toe get common right now, what I can do is I can do something really nice way I can put slash star ass tricks on under need in your ass. Trick slash. Basically, this is the star. This is the end and everything in between this will become a comment. So this is ah, multi line comment on double slash is a single line comment, Single line comment. Now there is something else called document comment on what it does. Is it basically for the document? You want to give information about the document about this specific software? This is Pacifica. What? You can see it's a specific program. We're gonna just give it in, Doc. Comment. So the way it is written is same slash Asterix. But you have to put another Asterix in here on now. As you can see, anything you put in between, these two will have Asterix before it. That's how it's gonna work. That's how it works on. Let's go to our teacher. Number two on that is or starting our heart to. And that is the difference between Val and Warren. No, we know that Var is a value holder, right? It holds some particular value. Now let's say war X equals string on that holds value off Sabrina. Now, this is a Sabrina. Now that I suppose Sabrina is our main actress, she is the heroine right now. I don't want acts to be changed by mistake or anything, so I want X to remain Sabrina during horror movie. Right? So during that situation you need a constant in Coleman. That constant is vile. If this doesn't make sense, let us take another example. We know that pie, you know Pi P. I is a constant value, part of our pie off type. Let's say double on it is 3.1 for something I remember till 3.14 so pies are constant value now. Constant value means it shouldn't be changed. So there are some values that should not be changed on remained same. So that's foul. Whenever you want the value to no change and remain the same, that is when you use the Val Cheever. Let's suppose last example would be Val. Let's say software name soft via name off time string. Now Do you want this off their name to change any time in the future? Obviously, no. So it's in my up. My up is the a politician name or the software name, so this is how it works. The only different is that far is a mutable type, and Val is immutable. Mutable means that it can be changed. Its value can be changed in the future, but the valve value cannot be ginger, so cannot begin means like I cannot ride X is equal to now this time cat. It's not gonna work. It's going to say axes all ready, Severina, so you can't change it. But later I suppose I want change pie on. Let me change pies value to Okay, actually, let's make it far simply so. If I said var, its value should be changed. This is Capital X. So small acts. It's really can't be changed, right? So as you can see in your, its value can't be changed. Its not giving me any error. But if I come back and change it to Val on C, it's gonna give me error. It's going to say Valle cannot be reassigned. Means it cannot be changed now, going to the third thing that it's got strings. Kampl it. This is one of the most important thing in Cortland. It's really amazing. Thing is, let's take let me take out everything in here on Let's bring from variables tutorial. Let me bring this thing this piece of court on. Let's pray sitting here now and you can see this thing. It's really bad. I mean, I don't know, but it looks really terrible. So the way to overcome this. It's really easy. You want to say my name? Colon dollar sign The name of the variable that is my name on slash and means new line My age on the ages, a dollar sign My each non slash on means New Line. No, let's type gender, colon dollar sign gender. New line is married. Dollar Sign is married. It's really easy. As you can see, basically what you're doing is you're saying when I say dollars on my name, I mean that this name should be printed in here or it's valid. Should be printed in here. So let us renders and let's see whether it works or not. And as you can see, it works perfectly. And there is no places in between. Okay, guys, that was old for Distrito Riel. And I'll see in the next trip. Bye bye. 8. Get user input: you also people as American. Welcome to this tutorial and industry story. We're gonna be learning about the user input on the two Cheever. So let's get started. The first thing we're going to look at is the two key word. So simply let's suppose I have a very bold called acts on it is off type end on it contains value or holds really 25. Then what I'm gonna do is I want to convert this to a double. Come, would what I want to convert excludable. It's really simple. You gotta say axe dot to double on you a dent. Make sure that it's written as it is. You have the Prentice's on you have after to the first letter capital. So if you wanna convert to double, you get her right. Capitally if wanna convert too long, you got the right capital pals. OK, so if you're in this, we see that it has been converted to double. Now, let's take another example, we're going to save our why. Off type. Let's say string on it holds value 30. Right now, what I want to do is I'm gonna use this particular string for multiplication. I'm gonna go and say print Allen. Why Daut to end under apprentices on here? I'm gonna multiply it before on. Obviously I forgot that T in here, so print. Okay, now let us run this on. As you can see, we have successfully converted a string to an end. Now put in this method in use less save our axe off type end is equal to read line. I can't. And then we're gonna say that to end Similarly Var Why off type and is equal to read line on do you interstate to end on you on a print Some dollar sign curly braces And in here you want to say axe place Why? Okay, so now what is happening in here? I'm declaring a variable called axe on it will hold what it will hold this value This value means user will enter a value The read line means get the value from the user so usually enter value on it will be converted to end Now this particular thing in here you have toe actually bear with me with this because this has no big covered yet But we will cover it later Just write these exclamation marks on. Just ignore these, please. And just ride them as they are because they are needed. Otherwise this This will not work. So basically, I'm taking a value from the user and converting it into a strength into an into story on same. I'm getting a value from the user on converting it to an end. Now, what I'm saying is I'm saying I'm gonna print were the same. Then I have this method something different. We know that we have string template, but what does this mean? Well, in string template, what we have is a single value. Right? Let's suppose you have something like this, right? Or something like this. Obviously it's it works, but sometimes you need note one value. Maybe you need to values together. So if I say X plus vie, as you can see, it considers the fast failure the first radio to be the part off string template. The second value doesn't appear to be like that. So you have to make sure if you have multiple values, you put them in the country versus now let us renders and see whether it works or no, As you can see, it is written for my imports. I'm going to say 25 again. It's reading, so I'm gonna say 30 on. As you can see, it says some is equipped training or 55. Similarly, let me copy this on. I'm gonna make it an L. And I can't copy this. Sorry. Let's have multiple copies on. This is gonna be the difference. This is gonna be the multiple on this is gonna be the divide or division. So this is the difference. This is the multiple multiplication. That's right. Multiplication, That's what On here, we're going to ride the region and let's Or in this No, that's right. Training five. 55 on as agency. It gives me the some the difference. The multiplication on the region. Okay, guys, that was old for this tutorial. And also in the next trill. Bye bye 9. Intro to Arithmetic Operators : you also people s a my taken welcome to two surely number nine. And in the story we're gonna be learning about operators. So let us get sorry. First of all, what is an operator? No operator means a symbol which repressions some action. For example, the symbol closer presents some action off addition. Right. Symbol miners. I mean, this this thing in here, prisons and the action off subtraction. Okay, so these are These are up rivers. So operate is what operator is a symbol. Richer presents some action on industry tour. If you're gonna be learning about the mathematical prayers known, these symbols aren't what these symbols are. Addition that we actually have a multiplying comment in here. So we have addition symbol as plus, we have the subtraction symbol AZ minus. We have the multiplication symbol, Oz the star Asterix on. We have the division symbol. Well, Lord on, it's not the last one as the region arm and slash on we have the modular symbol. What? More jealous Now this might sound new to those who are coming re first. For the first time in the programming field, my sound different, but it is basically something that you need to learn and it's really easy. So it looks like the person to sign. Right? But it's not the person. It's a model. This Okay? So sound interested? Sounds interesting, right? But what is it? How do you look at it, or how do we use them? Well, there are easy to use. Let's have a simple example. All right, let me get rid of all of these. So we have a simple example. We have a valve. We know the Val is constant, which means All right, this value cannot be changed later on. So we have a vow called number one. It's trouble. 10.5 numb to or number two is 3.5. Now, the result will be in double double means. Ah, in dot notation. Right. It will have a dot Still have a daughter. Okay. No, it's saying that number one that is 12.5 Pleiss means we are adding these truths with So we are adding number one with number two on the process. Addition is occurred through this symbol. Okay, Now we are printing that inside in here, So we're first Ah, taking the 12.5 that is 13 13 16. Right. So we are saying 16.0, will go first in the result and the result will be printed in him now again, 12.5 minus 3.5. So 0.5 point five goes directly and Trump minus three, is nine. So we have nine in here, not multiplication at his ass tricks. Asterix means that the multiply these two numbers Well, we know what is multiplication, so I don't want to force it. It's just as simple as we know it. It's multiplication. Come on now the last one is the the second last is the division on as we know, it's division like to divide by two is results in one, right? So you know to be right with two results in what one? Similarly, we know that Tom devote, but five results in two. Okay, so it's easy right now. The last one is not easy one. It's not hard. It's easy, but its arm in. It's really some. Sometimes for some people, it's really hard to compute through their mind, but still really is. It's just as hard it is to compute the numbers well while adding or dividing come on dividing is no easy one in mind, right? So this is the same way for some people. I mean, not old. Some are geniuses out there and I'm not one of them, Believe me. Okay. So, NEDA, suppose I do. I can buy in three. Well, 10 times. Three times three is nine. What is remaining? Remainder is one. What? So the remainder is what one? What is one? Remained remainder. Now this remainder is actually model ist Mortal is where it does. It gives you the results. Ah, the remainder as and as a result. So when you divide 12.5 by 3.5, the result is what the remainder? The remainder is you answer. No. Let's see what is remainder and let us see how it's gonna come out. So let's run this, operators. Lord Katie, An African tea. We have. When we are two numbers, we get 16. When we subtract numbers, we get 19 point. All with the multiplication is 43.75 with the division is 3.5 someone one for well, at least not in the pie number. On with the division with the model is the remainder is 2.0, What is remainder to remain is too, that's all. OK, guys, That was old for district rail. And also in the next trail. Bye bye. 10. Intro to Assignment Operators: you also people us American. Welcome to today's tutorial. And in this tutorial, we're gonna be learning about assignment Operator, so less. Get start. We know that when we declare our value toe a variable, let us suppose I declare value off acts toe a very well. I like actually really off 25 to variable acts than this equal sign in here. It's set to be an assignment operator. So equal Sign is actually assigned the value 25 to the variable axe. Similarly, if I create a very well, that's a hot dog. I let its price are 36 so I'm basically assigning the value 36 to hot book. No. Well, it's simple thing. We already know that. How to create a variable. All we needed to know is that there is something called equal sign on this equal sign in programming language is called assignment operator. Ok, well, what if I'm gonna sign or I wanna add of value off 25 with 10. Okay, So the value of fact, Simon, add up with 10. So in actually assignment in assignment off Bridger, let me actually print this. So print Ellen on. They're gonna print Exe Now if I want to increase Ah, this ax by 10. What I'm going to do, I can always say acts is equal to X plus 10 right? So the X ISO value work. Well, you didn't. Don't need this, by the way. So axes What access? 25 25 plus 10 is work. 25 plus 10 is 35. Okay. On that 35. So this value of 35 is being assigned to Axe. So what is the new value of X? The new value off axis Terrified. So any time I call acts, I'm not calling 25. I am calling 35. So let us renders and let's see. What do we get? Nice now? Well, in programming, actually, we have ah, using this equal time or assignment. Oprah, We have short away off assigning some additional value toe the previous very. But look it So let us suppose I want same way. If I wanna do the same thing, I can do it in a simple way. I can say ah plus equals ton not close. Minus plus equals 10 Now. This plus equals basically means X is equal to x Pleiss 10. Okay, so we can rather than this big notation in here or expression in here, we can actually just use this thing on. Be a good to go on for subtraction. We have x minus equals 10. So they are subjecting time. Okay, good. Actually, let me print this. Copy this print so that anytime we need it or we keep printing the new results. Right. So this time, what's gonna get printed? Well minus X. Very well reprinted. Similarly, I can say X times equals 10. Basically, I'm saying X is equal to acts is equal toe axe multi by baton. Okay, I'm so on so forth. We have event we have for the region to so X is equal to exit deviant drive by 10 on behalf for model s ex. More or less equals 10 were real. Basically, this means X equals ax. Mortal is 10. On this one means X equals ax divided by 10 is wrapped. So these results won't be printed. The multiplication and the division ones, because I'm not printing them while I can print them. It's easy, actually. Any printed for you, So it's just requires three lines more. No, big deal, right? So let's right click on Let plea the operators on. As you can see, we get 35 Ryle, adding with 25 so 25 plus 10 is 35. Good on 25. Okay, now it's 35 right? Desist. Or if I 35 minus 10 is what? Well, it's stratified. So we get 25 back printed now If I multiply 25 by a ton, it's 250 right? So 250 Now if I divide to under 50 by 10 it's 25. So on the model is off 25 while IHS five. Because if I divide Ah What if I divide 25 by 10? The remainder is what tremendous fight. So we get the remainder or five? Okay, guys that old for district Auriol and also in the next trail. Bye bye 11. Intro to Unary Operator: you are so people asylum are taken. Welcome to this tutorial. And in this story, we're gonna be discussing unity operators. So first of all, what is unity operator? You knew Printer is basically an operator which does some operation on a single value on a single mathematical value. Let's suppose we have ah, value ton. Now, if I do a single value, which has nothing with it like we don't have any expression, we have only single value. If we do some operation with it using some operator that is called unity operator. So the operators which we can use for doing some manipulation with the value our plus minus , not sign the incrimination sign on the decriminalization sign. So let us learn about all off these. First of all, I'm gonna print print Allen. Okay, Now, let s suppose I have a very blacks variable acts that holds value 10th. So we know that if I print this, it's gonna give us 10. Okay, we have time now. If I put minus with it. What's gonna happen? Well, if I put mine is with it, it's gonna become minus 10 right? As you can see, we have minus than we have done. So minus does some operation or minus does some manipulation with a single value. Similarly plus, Also, there's some manipulation, but for now, it's not doing anything. They're Suppose I have minus 10 in here. Nothing, because plus minus is minus. So no difference. Well, plus, there's some things. That's why it's not wrong right now. Let's see what North signed as well. No, doesn't work with this. North works with true or false. I suppose I have a value. True. Okay, now, if I put not in here, what it's gonna do is it's gonna give me the opposite off it. So right, click in here on Let us run. It is giving me what? False. Okay, so this is how it works now in Clemente Shin and d'Yquem intonation, how they work. Well, they are really easy. When I say implementation, I mean increasing value by one. So rather than writing, let us right an expression. Let's say we have canon here on I want to increase this value by one. So I'm gonna say place plus in here plus Plus, I want chicken here on a operators the insurgency it prints in lemon so it increased the value off acts by one. So basically, when I say placeless acts, I mean X is equal to X plus one 100 bucks and something nothing different on if I put minus minus in half, minus minus in here on renders its gonna actually give me nine Why? And because 10 minus one is nine. Because this basically means that ax equals X minus one. So X is what 10 10 minus one is what? Nine. That's what. Now you can actually put these things in front off this, too. So if I put placeless in here on right click on actually ah renders no difference. Actually, the reason is really simple when I say plus plus x So when I say place, place plus place X, I mean first increase the value, so make the value 10 or ill lemons or un then print it. Buy when I see X Plus place means when I put plus place in friend off the X not before the axe I mean first print the value it is. So what is the value off acts? It's 10. So first Brinton on, then increments it now If I printed again print Ellen without implementing it. You know what's gonna happen. I'm gonna get lemon, obviously, because it's got incremental after it was printed. So it was printed 10. Then when it got printed, it said, Okay, now you are printed, not increased the number by one. So it became in lemon. Now, when I tried toe print it again, it printed a lemon because acts became a lemon later on after getting printed. Similarly, you can use the minus one minus one. True on it will work fine on it would work the same. So it printed first. Then it decommitted by one. So then when I printed it again, it short, meaty decommitted value. Okay, guys, that was all for a destroyer. And also in the next trip. Bye bye. 12. Intro to Comparison Operators: you also people s Saddam are taken. Welcome to today's tutorial. In this tutorial, we're gonna be learning about comparison operators on what are they? They're actually symbols which are used for comparing values. So we have the greater than operator, the less than operator, the equal tow operator. The greater than equal to operator the less than equal to operator on D, not equal to operator. So let us look at some examples so that we can understand them. Let me get out of here. Okay, so we have print Alan. Four is greater than three is for greater than three. Obviously it it. So what should be the result? I mean, it is greater than three. And I know you are not lying. You're saying threats. So what you said is true. So what's gonna be the result? We know that we have data types, right? In data types, we have bullion data time and it is either true either falls. So the result we get from these expression is either true or either falls. So the result obtained from comparison operators are either true or either false. So four is greater than three. Is it true or false. It's true for is greater than three now hopes up. So you see now is five less than for no. Ive is actually more than for So this is actually false now is ton equal toe. When we use double equal sign, we basically mean equal. We are comparing the equality between them Is five equal to five? Yes, it is is can equal to turn Yes, it is so in programming for saying equal toe You know that equal sign is this right equal to science? So this is basically we are saying is Tana equal to 10 equal to 10? Yes, it is. But why to equal why not one equal went If we use one equal that would become the assignment operator. That would basically mean I'm assigning the value off ton. Two ton on that doesn't make signs. So we use double equal sign so that we can get rid of this problem. Now we have the greater than or equal to operative. Not this operator basically means if the value is I'd agree tha or equal. Then it's gonna return through in either off the cases off either greater or equal. It's been a return. True, I device is going to return force. So if I say or if we look at the example, Tan is creator than a lemon is a true no, it's false or can is equal to 11 is a true no. It is also falls so the overall result is false because none off the conditions have been met. Now let's see is 10 less than 11. Yes, it is on is tending equal to 11 new, but it is less than 11 so it will return. True because one off the cases is true. So we have to put true. Now is 25. Not equal to 10 is 25 north, equal to 10. It is not equal to 10. So is this expression saying right that 25 is not equal to 10? So if I a person comes to me on, says sir, excuse me, you're wrong. 25 is not equal to turn, so he's seeing the same expression. What would I say? He's trailing true or false? Well, this expression is telling true, it's not equal to turn. We're not actually checking. Whether it's it is equal to it is not equal toe we're checking whether this expression is saying through or false. So it's saying True that 25 is no equal to 10. So right click in here on Let's run this on. As you can see first is true. Second is fold. Third is well read in check. But it's true that Tunney's equal to 10. Right on fourth is false. Then we have True. Then we have true. Okay, so all the expressions are right. Correct. OK, guys, that Russell for District Auriol And I'll see you in the next trip. Bye bye. 13. Intro to Logical Operators: it was the people that said, um, Ali Khan. Welcome to do this tutorial on in this tutorial. We're gonna be learning about the logical operators, so let's get started. First of all, the logical operator can also be caused and Andi on or operators So it's aunt or better on or operator on. Basically, aren't means on in programming is written as this double hand on or is written as double bar. Shift Under is a button above the chip. Ah, shift Sorry near the and Turkey. So double bar this means on on the other one is or okay, remember from, or Prius tutorial that print Alan. Let's actually print Alan. Not if a value ton dis created an equal to is greater than an equal to 10 basically means there are two cases, right? It's either great. Uh, it's either greater so we can say in plain English, if 10 is greater, it's true. No, here, look at this. You're saying if the value off 10 is greater than 10 is it greater than 10? No. So we can actually take this out for 10 is equal to them. Is 10 equal to 10? Yes, Then it's true. So if one of the cases is true, then it's true. Similarly. Oh, are also works like this, but it doesn't compare to values. It actually compares to expressions. Now let us suppose. Actually, let me 14 here. I forgot t Now I suppose I have to expression in here. One is this Andi. I compare it with another one, I said, or 25 is greater than 10. Or actually, that's not say that greater than Ah, 50. Now look at this. 25 is greater than 50. Is it greater than 50? No, it is no. So it's gonna be false right now. This is what this is. We know that true because time is equal to turn in our expression. So it's saying if either one off these expression is true, then the result will be true. But if I copy this and printed here on put double aunt in here. So this basically means if either of the conditions is false, that it's gonna be totalled fault. So if one true total true, if one falls total frauds, total fools. Sorry. So let's actually rent this on its revise it a bit so true If one of the expression is true . This expression is true, right? So it's gonna give me true even if this expression is false No, same case. This expression is right. So it should give me true. But it said I'm on not or so I have to get both of them. True. So this should also be true. And this should also be true. So this is true. But this is north. That's why we got false. If this was true and this was true, we would have gotten true. So in on a case, if both of the values are true, then it's true. Otherwise it's false. Okay, guys, that was all for District on also in the next trail. Bye bye. 14. Intro to IF ELSE Statement: you are. So people assume I'll even welcome to this tutorial industry jury we're gonna be learning about If statement now, if statement is basically it's like if condition some condition, it's true. Then this piece off court should be executed. Otherwise, house, this piece of court should be executed. Okay, Now, I know it doesn't make sense to you for now, but vivid me on. I hope it will make sense to you after this. So this first start with the first pop. Let s suppose we have a variable called age right on. It is off for now. 25. No, I say if age is greater than or easy country 25 then this expression should run. Right? So the expression is print Allen, you are good to get married. Good to get married. Now that I suppose I'm developing a program it suggest to people whether they should get married now are Wait, right. It's simple program. So you're good to get married if you created in 25 or 25. So let's suppose Ah, this guy's ages like 36 right? Well, that's really, really, really important for you to get married at its it's but so it says you're good to get married, right? No. What if the result is like the guy s trainee or the girl is training. So if you're in this, what's gonna happen? Well, it doesn't print out anything. So for that we need to put outs else than an expression and or the Prentice's on in her. I mean, the curly braces story on in here. We can print out another line print. Alan, it's gonna say, Please wait some time. Please wait until you're 25. Okay? So if I read this, it's gonna say, please wait until you were 25. So if you are 25 excuse me. So if your age is 25 or greater, it's gonna print out this message. But if your age is less than 25 that is gonna print out this message in here. What? Really easy, right 15. Intro to Else IF Statement: you're also people asylum. Ali Khan. Welcome to this tutorial. And in this tutorial, we're gonna be learning. How can we deal with a situation in which we have multiple conditions? Like for each of 25 we can see that he should get married. But if he is, like 40 so we should tell him Please get married as you as soon as you can, right? So how can we do that? Well, there are two ways. So we're gonna look after the first way that is. Just put another if condition, so another if condition. So another. If we'll deal with this so we'll have another if and it's going to say if it is greater than or physical to 40 let's change this from 32 to 42 let's horrendous. No, As you can see, it shows us that if you're good to get married, because the as the age is greater than 25 42 is created and 25 so it says you are good to get married. Then it's It looks at this condition in here on say it's OK. It's foot to or greater than 42. Then it prints please get married as soon as possible. Now, even though we got the right message, we still got the wrong message. So what we can do in here we can use something or the art in here. So on. Logical operator on, we can say age is less than 40. Okay, now this situation or this condition will tell it if the age is greater than 25 or 25 on is less than 40 than it should be printed. If it's more than 40 or 40 this statement should with printed right. So I'm going to right click again and let us run this now. As you can see, it says, please get married as soon as possible. Now let us have a situation where the guy is like 150 years old. It's almost impossible, But whatever, let's say ages greater than or is equal to 150 years on. We want to say, Please don't get married right. You don't want toe destroy someone's life and on top age, right? So we can say, Please don't get married. I don't mean to say that, but it's just example, so it's right. Click on Let's run this. Now you will see that this message also appears because according to the situation, the ages 42 which is created and okay, I forgot this. Let's ride a 100 54. So it does the trick. So let's right. Click and see. Now you have to situations in here first. It's checks if the age is greater than 40. Is the age greater than 41 54? Yes, it is. So it's gonna print this one. Then it's gonna go to the second part in hair on it's gonna check. Is the each greeted than, ah, 1 50 on it is it's 1 54 So it's gonna also print this part in here to overcome this thing well or well again. Use the logical operator on on pregnancy. Age is less than 150 years now. If I right click now on a rend this conditional statement or conditional program on this, as you can see, please don't get married. Appears according to our input. Simple Right now, the other way the other way is actually quite simple, quite alike. All you have to do is write in here else if else if else If now, if you look at this, we have one if in here on the else is here. So anything in between is additional student. These are additional statements. So they come under the if statement. Okay, but you can use both. No problem. Ah, the conventional way is to use else if because it's it makes more sense when your programming big things. Okay, so let's right, click on Let's run this RNC if it results of the same thing and as you can see, it results in the same thing. So be a good to go. Okay, guys, that was old for Distrito Riel. And I'll see you in the next tutorial. Bye bye. 16. Intro to When Statement: U. S A. People s ceremony can welcome to this tutorial. And in this tutorial, we're gonna be learning about the went statement. So Laska story. So first thing first, what is events? Statement? Last supports. You have a situation where you ask the user to input a value. So you ask the user input value. For example, you have options like courses, my science, physics, chemistry, and so on. So for it and you ask that choose from these on. Ah, numerically, like Matt has a number one on English has number two and someone's offered. OK, so let's suppose we have number one for math on, that's all. Now the user inputs the value. And according to his selection, they there should be on our court, right. You should give him a result for his selection. Right? So in this situation, what do you do? Well, one way is you say if let's suppose the value is who are subject type, So visa. If the subject is equal to English. Okay, one, then this Alice, this on else owner. So also for So it's basically the off conditional statement or if else statement now there is an easier way for this because in this situation you have to always right, if else if else right. But if we use the Brent statement, which I prefer in this keys, then you're gonna see it's really simple. We're going to save, then bucks London in here. We'll have our statements. Oh, we don't have access sort events. Subject some checked. Then you're gonna say if he chooses one, then Franklin contracts. You have chosen Mats as a simple because it's nothing riel. So we keep it as simple as possible. No, If he gets or he chooses to, then we can say print Allen on. Actually, let's not say that. Let's copy this part in here on Pieced it, Let's say English on for the third part. If the result is three, then you can see print Allen physics. It's none of this else. Then you're going to see front Ellen on. Let's say Ah, please choose the correct extension or a number. Okay, now, because it's to it should print English, right? Click in here and go to Ren Wen's mint statement. And as you can see, it says, Congratulations, you have chosen English. Now let's suppose instead off this in here instead, Off a number, I have a string string. Okay, So if the string is, let's suppose for now my string is English, Then I'm going to say if the result is English. Oh, sorry, Matt, that it should print this if it's English than it should bring this on. If it's ah friends, six men, it should print this else it should print. Please choose the correct subject. Right? Click on Let's run this. And as you can see it says, Congratulations. You have chosen English. Let's choose physics in here for a change. Okay, right. Click on Let's run this Another agency. It says congratulations. You have chosen physics. Okay, guys, that was old for Distrito Reum. And also in the next tutorial. Bye bye. 17. Intro to While Statement: it was the people a Somali can welcome to this tutorial. And in this tutorial, we're gonna be learning about the while loop the while. Look. Okay, so let's get started now. What is a while? Loop before that, let us understand. What is a loop? A loop is basically something that keeps going on until it reaches its conclusion. So it's a repetitive task, you know? Okay, Now let us suppose a situation in which we have to print numbers from 1 200 in simple programming or in simple Kourtney and you have to write print Ellen one and then train Talon 2345 and so on. So for it till 100 fine on that is gonna be really tedious and really, really hard work and really stupid fork. I mean, there is a saying or there's a court like which Say's ah, repetition. The petition is a curse. I don't remember their petitions piling. I forgot. So if repetition is occurs, what can we do? We can use loop to stop repeating ourselves. How does it work? It's simple. You sit while while we have a way, have a value X is equal to or is greater, less than equal to 100. Repeat this court until or unless it becomes 100. Repeat discourse. What is that? What is the court? Print Island X. Now, let's suppose we have a variable acts of our X, which is zero on we have X plus plus means increased tax. Every time we come in here, we execute this court, increase X by one No. What's gonna happen? Do you know what's gonna happen? Is gonna print Jazira. Then it's gonna print one, and then it's gonna print to until it reaches 100. It's going to stop at 100. How do we know? Well, we know. Let's see how it works. So we go to our ah, please our idea in here, Right? Click in here and we're gonna create a new colon file. London from you were gonna say mean, we're gonna say var axe off type and is equal to zero vile. Okay, while ax is greater than or equal to also less than or equal to 100 100 in here, then repeat this court print Ln X After that organization ax plus bliss. Simple, right? No, let's run this on African. See, we were able to print numbers from 0 200 using this simple cord rather than writing 100 off course off lines. Okay, so Well, this is nice. This is really nice. Okay, Now let us actually look at something called do while it's really simple you put do in here . You take this out and you put do in here on, then you put while in here. Now, what's gonna happen is it's not gonna be anything different. It's really the same thing. So if I come in here and see it prints everything now what is happening in here? Let me bring out my epic pan in here so it will help us explain the situation. This part of the vile, this conditional part of the while please. The main troll in the execution. So it says when to stop. So basically, if we don't have this, we don't know when to stop. So we need to have this. So what happens in simple while in simple while we, when we come inside recheck is axe less than is equal to 100. Then we start printing the come situation there. We need to first do something then. Okay. Sorry. Do something then check the condition for checking the condition. First you use the vile statement on for checking the condition later. You used the do while statement. Okay, guys, that was old for a distant Auriol. And I'll see you in the next trill. Bye bye. 18. Intro to For Statement: There were some people that sell American. Welcome to this tutorial and industry, Jordan. And we're gonna be learning about four. Luke, No, for love works the same way as divide Lou Forex. Except for this part in here. This part in here, something that can be done in four loop is apparently apparently theoretically possible in via Luke to So anything possible in via loop is also possible in for a look. Theoretically. Okay, So practically it might be hard, but theoretically, it's possible. Now, this part in here is a bit complex part. It basically needs a group. Needs a group or a collection or arrange. What do I mean, Mother? Well, it's gonna be really hard for you to understand, but let me try explaining it as part of our simple, as simple as possible. In our simple as possible, we print Helen. I'm gonna say it one door 10.5 on in here. I forgot print again. T now let us renders the African See it prints one door 10.5. No. One daughter five is worth it is arrange. It contains 12345 to break it down and write each step each number we need to use for look , so we can see it for I in 105 print. Alan. All right, Andrea, Good to go. Now let's take this out. Now, if I've rent this, it prints. 12345 Now logistic. And let the example. It's gonna be about a reason we haven't covered arrays yet. We're gonna be currying it after these tutorials, but let us understand. What? What is going on in here? Let me print this in here. So we have a situation there. We have language is variable. And this variable this one variable contains Ruby Courtland, a python on tower. It contains home in languages. It contains, like, four languages in car. So what I say is for item in languages for item item could be I So it's I for I for the i and I is basically the holder that is going to take Ruby that is gonna print than it's gonna take Scotland. And it's gonna print than Python that it's gonna print and then job. So I means every time I gonna hit the rate, it's gonna change. So this time I in languages, is ruby present in languages. Yes, it is present. So printed. Is Scotland present in the language? Yes, it does. Present printed. Is bison present in the language? Is it just prison print? It is, Jonah, present in the languages it is present. Printed is nothing present in the language? No, it's not present, so don't print it. The Here. Hey, stop. This is how it works. It goes through the array. A group, A map. Ah, range. And then checks. Weather. This thing, this data belongs to the group. If it belongs, is going to say true. And then it's gonna go through this. Now, what's going going in here is you can actually skip the print, the curly process, you know, skip them in cold. And actually, you can print them as this u can write as this. And it's gonna accept this. It has no problem with that. So if I renders as you can see, it has printed Ruby Colon, python, Angela. Okay, guys, that was old for this tutorial. And also in the next shirt. Bye bye. 19. Intro to Nested For Loop: here was the people Asylum are alaikum. Welcome to this tutorial. And in this tutorial, we're gonna be learning about nested loops. So lask it started. Well, I thought that me need actually to practice loops. So why not practise nested loops? So I'm gonna actually clean this up now. What is nested Loop Mustard? No, it's basically Ah, loop, insider. Look. So if I have a for loop on inside it, we have another four loop, then this form off writing loop inside a loop is called a nested look, nested loop or nested for loops. Let's create an example which prints timetables, went time tables on those are from 1 to 10 on and they're gonna look like one times two, OK, two times. One sorry equals to two times two equals for on so on. So forth on, then, when it's two times 10 equals, Ah, 20 is gonna break it down by putting stars in here. It depends on you how much starts you want, maybe 10 stars. Then after that, it's going to start it three times. One table on so on so forth until it reached the 10 time 10 start is a cool 200. So it's obvious. The first thing. First we need a for loop. Okay, on V need work. We need ring is rains or ranges. They will be from 2 to 10. That would be the tables from 2 to 10. Another range from one toe town. That would be the times. So two times one is equal to to something like this. So these numbers get multiplied with these. Okay, Now let's go back to our program and let's start programming or let's go back to our I d and let's start programming. So the first thing is for for I in $2.5 or 10 story. So this is our first loop. This part is concerned vid the two times one, though. So this part is this one. So visa two times one. So we need the one part for the one part we're going to write the war in part. In here for Jay, huh? And one daughter 10. So we have now in the second part, that is times one. Now let's go meet the third part. The third part is to so we need the result for that. We're gonna use the print Alan, simply on inside in here, you're gonna say dollar sign I times dollar sign J equals dollar sign I times. So we're good to go. Let's print this for now. And let's see whether it works or not. Obviously we haven't then the line, the separator, the stars that would separate these lines. But let's even it works for now and not on it is working two times 12 until it reached 10. 10 sort of times 10 is 20. Then it it starts the three times one now inside. After this loop, what I'm going to say is, I'm gonna say print Ellen for actually, I'm gonna write a new loop. I'm going to say four. I could simply say that, but I'm gonna use another four. I could simply say print Ln on, right star, star, star, star star. And we had done good to go. But I'm gonna use the loop, but let me show you whether it works or not. On as you can see, it works really fine. So what I'm gonna do is I'm gonna say for okay and $1.10. Okay. Friend star. So it's gonna print start 10 times if I put print, Ellen is gonna create a new line after every story, and that's gonna be a problem. So print star here, we're gonna feeds a problem that let's see what the problem will be. No as urgency. This part, this is the new table comes in here. We want to start after the line after the stars. So the way to overcome this problem is something you're gonna find by yourself. I'm not going to help you with this. You go by yourself on search on learn. How can you do it? It's gonna be simple. I hope it's simple. Well, it's simple. I know it's simple, but you check on it, you learn how it is in. Ah, and okay, now we're done in here. Let us understand what is going on in here again for once. So in here it says that to then it goes inside in the for loop at first Says is too part off. Ah, this rain, just it is part of this ring. So it goes inside the four look which ends in here. So it's gonna execute this whole program home in times 10 times. Okay, Now, when it goes inside, it sees that there is another for lewd. So the first thing it encounters is another four look. And it says that I have to run this new for loop 10 times. So it basically has 10 boxes such as thes. Okay, 10 boxes. Ah, by this and in every box it has to create another 10 boxes and so on. So for it, Okay, in every box it has to print two times one. So it has to print the value of I. That is, to than value off J. That is one for the first time on it should bring the result not for the first books is going to say to for the value off I for the first books on the J will keep on changing Tillett REITs 10. Okay, now in the second books, it's going to start with three because this loop has ended, right? So because we have to repeat this court 10 times once we're done with this loop on, we are then with creating the line. It goes back and says, OK, is three part off the ah range. Well, it is so it's great. A new box on it starts the same calculation again, but this time, because the value off eyes three. So here we will get three times 13 times two or three times three till it reached 10 again . Now it starts again, with the value for on checks for is for part off this range. So it is. So it's going to start again and so on, so forth until it REITs 10 times 10 on. It's gonna be 100 on. After that, it's going to come back in here and say a lemon is 11 part off or is nothing part of this range? Obviously not. So it's going to stop going to say stop. We are done with this. Look on Bearden. Okay, guys, that was old for this tutorial. And also in the next trip. Bye bye. 20. Intro to Break and Continue Statements: you also people s them are taken. Welcome to Distrito Riel. And in this story, we're gonna be learning about two things that are the continuous statement and the brake statement. What the Continue on to new on the break statement. So let's get started. Now. What is the continue statement? Continous statement is used. Actually, both of them are used in Luke on the continue statement is used when you want to skip on it , Ray Shin. By that, I mean, for example, from here from four loop, you want to skip the number three? What can you do? Well, you can just ask it to continue when the value is three. Let's look at this. Actually, I'm gonna actually actually actually, actually ah, comment this out for this but part on Lee. Then we're going to come back to this after one. Now, let's suppose I have four I in $1.5 or 10. If I is equal to three, then continue on in here. I'm gonna say print Ellen the value if I No, what's gonna happen is it's gonna keep raining this thing for 10 times. But when it sees the value is I Oh, sorry. Divinity is the value of Phi is three. It's gonna go inside this and continue. Basically skipped three and it won't print it. It's gonna skip it on. Then it's gonna keep on executing till the program. And so let us try this one on. As you can see, it wrote one to, but it didn't print out three because we asked it Toe skip three on another way is or the other thing is break break means to break the statement to stop the execution off loop. So for that, when I reached till five, I don't want to execute the loop anymore because I don't want use less execution toe keep on occurring violin not actually benefiting anything from that so I can say basically bright. So when the value off eyes five break because I need the statement to execute till five. Actually, it won't. Human print. Five. It's gonna stop at four. Because when it's five, it should break. So as you can see it, 13 to 1. Okay. And now, now, let's actually take this out and go back toe over previous, you know? Okay. No, We have the program that is used for creating time. People's Let us suppose I don't want the timetable. Number three. I don't want the table off three to be printed, so obviously I can come in here and ask it not do anything when the value off eyes three because we get the table number from here. So you're going to say if I equals three, then continuity. So let's run this and see what happens. As you can see after tipped off, two of you get table before we don't get table off. Three. But believe me, if I say that this portion in here or this person in here actually ran 10 times when it shouldn't have ran because we are skipping, so we don't want it to run. But it ran because every time it checked whether the value of eyes 34 ah, the value off one for the value of two for the value of three. And so on. So forth for this Rupe. It ran this statement 10 times and we don't want that. And the proof of it is that it actually printed this after executing this whole statement and times. Okay, Now there are two ways to overcome this problem Number one is You can just cut this on friended him our peace to terror. Sorry on, let's go. As you can see, after two, it went to four. But it didn't execute this part of the court, which proved that it didn't execute any useless Ah court at all. The other way is you used the label. Well, the label is basically a name such as mean loop on in here. We're gonna say men, Look, man, loop on at So when you're naming it from the start, it will have at at the hand. And when you are using it, it will have at at this time. So it's opening and closing someone like this. So basically, it's saying when I say continue, don't imply continue on this part in here. Go and applied only main part. So it's gonna come here, and they're going to say or continue it. So it's gonna go back in here and it's gonna skip the value off three. So let's run this and see whether it works or not on as you can see, as a proof that this part didn't run at all. Now this main loop is user defined. You can use it or you can name it. Whatever you want. You can have. I'm loop on. It will work. Fine. So I'm up on. As you can see, we have no problem. OK, guys, that was all for Distrito Riel. And I'll see you in the next trip. Bye bye. 21. Intro to Arrays: yours of people Osama taken. Welcome to Distrito, Riel. And in Distrito. Really? We're gonna be learning about a raise, so let's get started. So, first of all, what isn't a re and a ray is basically a collection. Both data, you can say collection off information. So let's actually take an example so that we can understand. So the first thing is, we need a variable on the name of the variable for this time would be numbers on. We're gonna see array. Oh, here to 34 on five. Now, this is our array on. As I said, Array is collection off data collection off anything. So in this case, it's a collection of numbers, right? No. Once you create an array, it's size can't be changed. You have to keep this in mind. It's size can't be changed. Okay, so if an Array has five places, it will always have five places. Now, let us actually, uh, Frank, these numbers, the way to print them is friend Ellen Numbers. I hope this is true, but this is actually not true because this doesn't work. As we discussed in the for loop tutorial. This won't work. It rather gives us a location. So the way to overcome this problem would be one of the ways is used for Look, for I and numbers print numbers. Obviously not print numbers. This time we have to print I right, Because every time 123 becomes I and they are checked whether they are in the group or not . So let's run this. And as you can see, we have our numbers in him. Okay, Good. Now what if I wanna print an individual number? As you can see, I have to print all the numbers. What if I need to print? Ah, individual ah, number. Only one way would be the long way would be. You use the if condition. The particular number you wanna print is what? I suppose it's ah three soon, Issa. If hi is equal to three then, friend. All right, otherwise it won't print. So let's renders. Obviously you can skip the curly process. It's not a big deal on as agency. It skips three when it gets three in here. What if I say if I is 10 then print because there is no I as 10? It won't print anything in here As you can see, it didn't print anything. So when it found three, it pretty 31 way. Is this another way is, which is quite direct is you're gonna sit print Ellen on inside. In here. You saying numbers? The square brackets on from there. You right? Index number. Now, what is indexed number? Index number and basically is their location. This is location zero. Disintegration one dislocation. Tour. This is location three. And this is location for. We need the location number twos. Ah, number two's data. Whose value? So the location number two's value is three. So it should print three now, as you can see, it printed three. What if I want to change it? Change the value off the this in here. Change this one's worldview. Quite simple, actually. You can say set by saying numbers. First numbers set on which location? Location number two. So index number on, then what will you want to change it to? Let's suppose I want to change the location. About three location, but whose value to 10. So now if I run this as you can see Oh, I change the location in Beziers. Sorry. I need to look here, change the location, but to lose value. So let's reader in this no, as you can see, the location of the tools value. IHS Tim. Great. Right? Okay, now another thing. What if I wanna? I had a new earlier Sounds difficult right when it is possible, but you have to create another variable for that. Let's suppose Ah, you say bar numbs is equal to numbers dot plus on the value on art is that's their 200. Okay, on, Let's now print the numbs. Okay, now it's not portable Possible to print olden times. So let's go for I in thems print Ellen, I So it's gonna print all the eyes and, as you can see in the new, um variable or in the New Arabi, have 1234 and then 200 five into in this story. But in the previous one, it's all the same. So the sternal numbs. Let's goto numbers close this on here it print Ellen. All right, let's run this as against the 1 to 10 4 far for because we change the value to 10. The other one is 123 because we are taking from here from this one. So 12345 then 200. So we have to a race now rather than one. This method creates the new worry and puts additional value trade. Okay, guys, that was old for destroy all. And I'll see you in the next true bye bye. 22. Intro to Functions: us the people at Semicon. Welcome to this tutorial. And in this tutorial, we're gonna be learning about functions so less get started. Now, what is a function? A function is a separate piece off court. If that makes sense, it's Ah, separate piece off. Could we're gonna start with the keyword fun. Fun means we're creating a function named as greet on the name of the function is great. It can be anything on inside. In here we have an argument and input, which is called person off type. Strength on the return type is string. I know it. It doesn't make sense to you. Ah, free now. But bear with me for a second on I'm gonna say a return. Hello? And the name of the person person now in here. What I'm gonna do is I'm gonna say front. Ellen, Greet Ali. Greet what? Ali on. Let's bring this. So as you can see, it says hello, Ali. Now what is happening in here now? This is basically ah, how function works. We create a function by saying fun Cheever or by writing the funky Vered and writing the name off the function that is in this case, Greet on the input that you use from the user or that you need from the user. So I needed the name of the person. So I created an input that I will need from the person so that this function can work. So I said, I'm creating a function called Green. Uh, agreed. And I need the user to give me the name of the person so that I can greet the person. Okay. And there is also a return type. Now, this colon and string basically means return type. It means that the return what I'm gonna give back to this part in here is this thing. Now, returning is basically I'm gonna take this portion in here after execution. So this becomes what this becomes. Ah, hello, Ali. Right. So it's gonna say it say is that I'm gonna take Hello, Ali in hair from here. Okay. I'm gonna take hello, Ali, From here on, put it here. Now we have a hello. Early in here. Right on its going, then. Print. Hello, early. It's been a print. What is gonna print? Hello, Ali. Because it has taken Hello, Ali from here. Okay, so it takes the execution. It's it's returning. Means taking this part after compiling and putting it in here. Now, let's suppose you wanted to return anything. Well, okay, good. I don't mind. In that case, I'm gonna take this war outside on. I'm gonna say I'm gonna take this outside to and I'm not going to return anything. Rather than that. I'm going to see print Allen, and I'm gonna print. So if I say greet Ali Great. Whom? Ali On a run. This Sam thing, it says hello, Ali. Now let us say Say goodbye. Say goodbye. So fun saying goodbye. Goodbye. Now, obviously, we need to Ah, put the name off the person, if required, sometimes not required. So it's It can basically say goodbye. So if I don't give it any name, it can. Just friend Alan in here. It can say goodbye. Good bye. Now what's going on here? If you give it an input, it will ask the ah, the during the execution to give it an input. But if you don't give it an input, it will still work without input. So, for example, in our case, we just want to say it should return goodbye not good bye, Ali. It should read Return goodbye for that. We don't need any import. So in here, I can just say, Say goodbye on run This as you can see it says Hello, Ali. Goodbye. Now, if I need the name simple, I can see person or P one or P on guy. I'll say it's a type of string in here. Goodbye. Knoller's on P. Where P is the name we put in here on the name is Ali on Let's reminisce agitation. See, it works really fine. Okay, guys, that was all for a district, Auriol. And also in the next trail. Bye bye.