C#: Start programming with C# (for complete beginners) | Lukas Vyhnalek | Skillshare

C#: Start programming with C# (for complete beginners)

Lukas Vyhnalek, Microsoft Employee, Programming Teacher

Play Speed
  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x
10 Lessons (1h 37m)
    • 1. 01 Hello World

      4:35
    • 2. 02 Variables

      10:24
    • 3. 03 if condition

      21:55
    • 4. 04 switch

      5:49
    • 5. 05 array

      8:30
    • 6. 06 for

      16:01
    • 7. 07 while

      7:12
    • 8. 08 do while

      3:52
    • 9. 09 function

      11:48
    • 10. 10 calculator

      6:49

About This Class

Do you want to start with programming?

Then this course is designed for you. In this course, you will create your first application using C# programming language. You will also learn the important concepts of programming. After finishing the course you should be able to create simple applications and have a strong foundation in programming. I try to explain how all the important concepts work and how you can use them in your C# code.

I know you don't have time for long and boring lectures. That is why I try to be as engaging as possible. I am also a thing to go directly to the point

Who should take this course?

  1. Anyone who wants to learn programming fundamentals

  2. Anyone who wants to start programming in C#

Transcripts

1. 01 Hello World: Well, hello, guests. And welcome to this lecture and this lecture We will create our first application. So let's get into it. Simply go to file new and then project. OK, then click on the project. And this shit they should appear. And in here, make sure to select the visual C sharp. And in here we also like the console application. So this one, that net framework. Okay, so the first application that we will create will be just the council application that says that brains basically on the screen. Hello world. Okay, so this is select. This is select. And then the name should be something like Hello world. You can obviously choose your own name bod yet so hello, world. And you can also change your location. I will just keep it the same and click. OK, so this will create a new project. A new application. This may take a while, for example, because the visual sido needs to create a lot of files for you, right? So that you are able to just write a few lines and create a working application, right? It's not so simple to bring something on screen computer have to do a lot off instructions . Bad, since we are using some kind of operating system library, right? We are using the tools that the operating system provides us. We can do it by a few lines, so let's get into it. In here is the program dot CS. And as you can see, there are using system system collections and stuff like debt. So what? What this means? Well, basically, this means that we are using some tools that the operating system provides us. So, for example, when we want to print on screen, we we don't know how to do that, right? But the computer, the operating system, knows how to do that. So we basically tell the operating system to bring something. And the operating system does that for us, okay. And the way we do it, it's quite simple. So in here you have the program class, and in here is the main method. So this thing, the decode inside these braces will be executed. One z program start. Okay, So when the program starts, this is when it happens. So when we want to bring something we want to write council, you may notice that there are some kind of hint. I can use that. So, consul and I want to write something. So right. And I also want nd line after I ride this so right line. And this thing is a method. So I know this may sound confusing right now because you don't know what is a method yet, but in the following lectures, you will figure it out. And it except a something called argument And in this case is just what we want to print. So let's say we want to print the hello world like this. I cannot just right hello, world, because I would get an error. Right? Computer things. This is some kind of command. So when we are writing strengths, we use Well, you are. I did like this. Okay. And then at the end of each line, we write Sema coy like this. So this is our working application right now. If I delete the semi corn, as you can see, there is some Brett underlining ride. So that means there are some error. So I need to write the senate going in here. And if I run this application using control and F five key it should open up a new consul and in there should be printed. Hello world. So this process once again may take a wild because we are D computer needs to compile a lot of files together and, like, split out the working application. Bad as he can see. Eventually it should work. And as you can see it says, Sorry. It says hello world. And then press any K to counting you. Okay, So desperate. Cool. You created your first application, and that's pretty much it for this lecture. If you have any questions, feel free to ask, and I will see you next time. 2. 02 Variables: Well, hello, guys. Send welcome to this lecture. In this lecture, we will talk about the variables, So let's get started. Once again, I created a new project that I called very of this tutorial and all of these files were created for me. So right now I have the main function and inside the main function I will ride the code. So yes. So what we want to do is let's just define a new variable. So let's say in teacher So we will store a number and let's go This one, our number blackness, right, semi coin at the end of the line. So this will say Tell the computer, Hey, I want a space and memory for some number. Then let's assign a value to it. So our number well, the equal to let's say zero, okay, and then let's bring it out. So, consul dot right line right line like this and inside it we will best the our number. So our number and what this will do well, it will bring the devalue that it's sort in thes this variable this our number variable and it will print it out on screen so that we can actually see it. Okay, So then what we will do is let's change the value off our number two. Okay? Like this. And let's print it again. So console, dad. Right line and let's bring to it our number like this and semi coin at the end of the line . Let's do another thing. So, for example, we can set our number to the result off some operation, right? So, for example, something like do blessed to okay. And end the line where? Semi cord. So, yeah, let's also print it out. So, Consul, Dad. Right line our number. Cool. Another another data type that we can use is the double data type. Right. So let's define a devil variable. And let's call it is one decimal number. Okay, That's similar number like this and end the line. So this will tell computer A I want another very ever in the memory, and this will be off data type double. And that doesn't mean that this one should kind of get lost. It will still be in the memory, right? This will be just somewhere next to it. Okay. So, yeah, let's assign a value. So that's in the number decimal number like this equals two, Let's say 10 or 15 like this. So right now we assigned a value to it. And let's also bring it out. So gone so that right line and in here should be the decimal number. Yeah, And another thing you may want to know. This is that if I get the rate of this in here, there's some green underlining. I'm not sure whether you can see it, but under these decimal number is a green underlining. And why is it there? Is that a mistake or something like that? No, it is not. It just means that we are not using this variable. So even though we signed to it, we don't use it anywhere later on. So that is just the way that visual studio tells us that this very ever is redundant. It doesn't necessarily have to be in this code, but once I even use it to print it on screen, it is used. And this this underlining disappears. Okay, So cool. Let's do another thing. So let's also defined a variable. But on Onley on one line, so do the declaration and initially initialization on one line So let's do it simply right . Indeed. Er, for some number and equals two, let's say five. OK, so this basically this is Eagle. This one line is equal to these two lines. Okay, so usually you want to write this This these two statements as this right. So only on the one line that you can save some space, but it doesn't matter. Both off these versions works just fine. OK, so let's also use other data types. So, for example, care as a character and let's go, there's one my character and let's set it to si OK, so this will be a C. Let's also define a string. So string my my name, for example, and this will be Luke like this. So note is that the string is wrote inside these and the character is wrote inside these. Okay, so don't mess that up. That would make a mistake. So an error your application would not be able to work. So yeah, another thing we want to do is maybe used the variables that we defined earlier. So, for example, and new variable will be equal to are our number. Okay, so this variable our number minus. Let's say the number. So add another variable. This one. Okay, so what will happen? Well, inside this variable, we will store the value dentists in this variable. This our number variable minus this the value that is stored and the number variable. Okay, you will see I go printed out on screen so that you can see so council dot right line And let's bring the my new variable yet new variable like this. Cool. And don't forget about the Semeka. And this is a so so common mistake, right? A lot of people from the beginning forget about the semicolon, So yeah, it happens. Don't worry about it if you forget. And yes, so that's also to find a bowling, right? So, Boutin, let's go. This wanna a? I know temp is a temporary You sometimes want to use this name when you want to store something only temporarily for like, a short period of time. Yeah, so let's set it to true. And let's also bring it out. So, consul and up right line and D tent. And let's also actually bring all of these. So let's also bring d my character and my name. So in here. My character like this and in here will be my name like this. And I'll just put a space, right. So let's actually run this application. And before you will see the results before, before I will show you the results. I want you to write on paper. What do you think will be bringing it? Okay, so, basically, what do you think will be the result? So I suggest you positive video, because right now I'm about to show you. Well, the results are okay. So as he can see when we bring the our number in here. So this this line 15 it brings zero. Why? Well, we created our number, and then we set it to zero. So the value that is currently in our number is zero. Okay, then we set the variable to 10 so the zero gets lost, and currently we have 10 in there. So as you can see, the computer prints 10. Okay, Then we set it to two plus two. So the result of two plus two is four. And then when we print it, it's us four. Right? Then we created the new decimal number. Variable. We said it attend at 15 and when we bring it on the screen, it says 10.50. What a surprise, Right? Bad. Yeah. So then we created a new character, right? So my character and it's just see? And when we printed it, it's a C. Then we created a string. Where is Luke? And when we printed it, it says Luke, so noticed. There are no these. These characters get lost, right? They are not bring death. This is just telling the way off telling computer that we want to print a string a sequence off characters. Okay. And then we created new variable, and that is set to our number minus number. So in number, we have five. And in our number, we have four. Right? Because this is the last time we set the our number variable. So in here we have four minus five, so that means minus one. So when we print it, it's as minus one in here. Okay, then we wanted to bring to the bullion variable, so the temple variable, and as you can see it's is true, right? Because this is set the truth. So yes, that is pretty much it for this lecture. This is what you can do with variables. You can play with it a bit And if you have any questions, feel free to ask and I will see you next time. 3. 03 if condition: Well, hello, Guests. And well countered his lecture in this lecture, we will talk about the if condition. So let's get into it. I created a new project, and in here is the main function. So this is the function that will be executed. So in here, we want to define a two variables. Okay? And I will create a first. And let's call this wanna bigger number. Okay, Bigger number. And I will set it to 10. And then I will create a second variable. And I'll called his wound smaller number, and I'll set it to one. Okay. And we will use thes two variables and a couple of conditions. Okay, so let's do that. When we want to create a F condition, we can do it so simply right. If then parentheses inside it is the condition, then braces. And inside these braces are the instructions that we want to execute. So, for example, in here we can write something like bigger number is not equal to smaller number, and then we can print it out. So in here, right council, that right line right line like this and inside. Let's bring for example, bigger number and right now, I would like to bring a string to it. Okay, so there are a couple of ways I can do it, but I'd like to use the concatenation. So in here I write, plus I and then I write string. So the computer knows it's smart enough to figure out Dad, I am not trying to at some string to a number because I cannot do that right? It doesn't make sense to at for example, A I don't know, for example, is not to to a 10 right? How would you add is not to a 10? That doesn't make sense. So, computer, what computer does is it says 10. It basically adds the value off this off this variable and puts it in front off this string . So it will result into this. Okay, Because this is the Vatican, so yeah, this is how you can. It's called string concatenation. Okay. And what I write what I want to write Well, I'd like to ride. The bigger number is not equal to small number. Okay? So is not equal to and inside here. I can ride the smaller number. So this will once again take the value that is start in this very ever. Okay, cool. And don't forget about East Sem accord. So what this means? Well, if the bigger number is not equal to smaller number, this line will be executed and it will brained then is not equal to one. Okay, so let's define another if condition So for example, I'd like to write if and let's also bring before these conditions will take place. Let's bring which condition is taking place. Ok, so conserve ride right line I will bring it out first condition. Okay. Like this. So then was the finding second condition So this is just for us to know which condition is being evaluated. Okay, so let's inside here, right? Something like if the bigger number is equal to smaller number we would like to friend Let's say so Council right line and we would like to bring that they are equal rights so bigger number plus is equal and once again, plus a small number so like this and I'll just put a space inside here and that's it. So yeah, and let's also use another thing. So let's in here i d else branch. So once again the else doesn't have any Bren theses, any condition It have Onley in the braces and the instructions that will be executed if this is not met. So if this condition is not met So in here, I'll write just gone. So the right line and let's right in here. Something like else. Right? That's all in all we need. So yeah, cool. Right now let's do some other conditions. So council right line and in here. All right. It's the third condition. Right? So third condition. And let's do it. So in your eyes, Right, if and let's right. Bigger number IHS Greater than smaller number write The code that I'm writing right now doesn't make any sense. It's not supposed to be a usable application. Just demonstration off the if statement. Okay, So don't try to think about it to Maja. Why am I writing exactly? This is just to demonstrate stuff, right? It shouldn't be. It shouldn't do anything smart. Okay, so let's spring inside here. So, consul, right line and in here, what we want to do. Well, bigger number IHS greater right. So is greater. Then the small number. Cool. And let's don't forget about the Sema corn at the end of the line. And, yeah, let's also use this time the else branch so else if and let's right in here, for example, bigger number is not equal to smaller number. Okay? And in here, let's right. Well, basically the same thing that is in here, so I'll just copy based it to save some time. Right. So in here we will bring bigger number is not equal to small number. Cool. And let's also put in here the else branch. And when we get to else, we will just bring this else likeness to. So yeah, let's go ahead and create the fourth condition. So council, dad. Right line. And in here, we want to bring fourth Dodd condition like this. And yes. So what did I want to demonstrate in here? Well, the separation off these two. So, for example, if bigger numbers well, basically this thing. So if I just copy and paste this to save some time, So if bigger number is greater than small number, I want to bring this stuff. And then I would like to do if and let's say the same thing as in here, so as in here. Okay, So bigger number is not equal. Two smaller number. So you while I'm writing these things, you may want to think about what will happen. What will be printed. Okay. So, Dad, then when I evaluate this thing, maybe writing on paper, if you don't remember everything, so write it on paper. And then when I around the application, you should check. And if you get everything correctly than great. If you did not, then maybe watch the video again. Okay. Cool. So in here, I just put the else branch in here. So that brings else cool. Let's get to the fifth condition. So come. So doubt. Right line. And in here I was right. Fifth condition, condition like this And this one will be a bit more complicated. So if bigger number a smaller than or equal to the smaller number I want to counsel right line. I would like to bring something right. So what I what? I want to bring a bigger number. Bigger is bigger, is smaller. So as I write this, you probably figure out that this will never be printed because it just doesn't make sense . Right? Bigger is smaller because that's exactly what what this condition says, because the bigger number is smaller. Origo to the smaller number. So you know it just doesn't make sense. But yeah, anyway, Anyway, back to the point. So in here I will to find a else if branch so else if and once again, parentheses and inside them. Let's say that the bigger number is equal to the smaller number. So make sure when you were I d equal sign in your application. Make sure that you don't forget to put the second equal sign in there. It's it's a in the beginning. This is a quite often mistake, right? The visual studio will kind of tell you that by this red underlining, but still a lot of people do this mistake. So when you check for equality, you want to write to equal signs. Okay, so in here was right gone, so right line and let's say, let's just say they are equal, okay? And yeah, let's end the line where Symbicort and let's define another else. If so else. If and so right in here, I will demonstrate that there are you can put more else if branches under each other, right? So else If and let's say bigger number is not equal to smaller number and inside, let's right gums. So council like this right line and let's right in here. They are not equal like this. Cool. And let's also put the last else. If so, the else of condition doesn't necessarily. Well, the if condition, the if statement doesn't necessarily have to end. With else, it can end with else if Okay, so this else branch is optional. Okay, So for example, let's say in here bigger number is greater than the smaller number. And let's print it out. So console Dodd, right line and in C inside here we will ride a bigger ISS gray out greater okay and put the same occurring and the end of the line. Cool. So right now, this is the fifth condition, and let's also define the sixth condition. And in order to do that, I will just copy based it to save some time. And in here what I will change is, instead of this else, if I will put if, at the end off each of them, Okay, end another thing. Yeah, Well, no, no allergists did like this. So if if if, If Okay, knows no else. If so, you may want to think about what will be printed this time, right? These will not be the same, I can tell you that. So, yeah, let's move on to a bit Complicated conditions. So council right line. And in year, let's right. The seventh condition, right? I think. Yeah. Seventh condition. And in here we want to define the complicated. So if and then let's use the end. And or so, for example, the bigger number is greater than smaller number. And so when we I want to write and in the code we used these two. Okay. And let's say bigger number. It's smaller, Dan. Smaller number. Cool. Right now, you need to make sure to close the parentheses, right, and then put in there D braces. And in here, what was right? Just first, right? Just to save some time was right in here first. Okay. And in here, let's put a another. So for example, else if and I'll just copy paste this condition and in here I will put negation in front of this. Okay, so this is even bit more complicated. condition, Right? So what does this say? Bigger number is greater than smaller number. And it is not true that the bigger number is smaller than the smaller number. So I will not be met if you don't understand this, right? This This is some not easy stuff if you are a beginner, so it's definitely fine, if you like through, like, staring on the screen and don't get a thing. But eventually you should be able to understand it. So maybe watch the video again, maybe watch the previous lectures and yeah, if you still don't get it, ask me a question. I will try to explain in a different way. Okay, so in here I will just bring second. And let's also define the else branch And in here, virologist brained council, right line and out brained in here the else like this. Cool. So, yeah, I didn't use the or statements. So let's also define the last condition. I promise this is the last. And let's just help you base that the safe sometime. So in here this will be the eighth condition, and in here we will put or so when you want to write or in your code, You write it like this. Okay, so this is end. This is your cool. So right now let's around the application. So control and a five. And this will compile all the code, and it will bring doubts and stuff. So make sure to try this on paper. And if you still don't get it, everything, so please pause the video and try to do it on paper. Because right now I'm about to show you the results. So let's do this in your as you can see, the first condition results into 10 is not equal to one. So then that means this bigger number is not equal to one. So that is the the smaller number. Okay, then the second condition results into else. So that means this condition was not met. And why is that? Well, then is not equal to to one. Right. So this equal sign, this whole condition will result into false, so that means this else branch will take place. Okay, so this will be burnt it and this will be skipped. Cool. The third condition says then is greater than one. So why is that? Where we go inside this if and check whether 10 is greater than what it s so we print distinct out. And then we break out off everything. So we skipped this whole code and continue with this line. Okay, So when this this is true, weep, rendez. So we evaluate all the code that is inside these braces. And then we moved serene. I deleted it. But a mistake. So I'll just do it like this. And then we move behind all of these, all of the skilled, and continue with this line. Okay, So Dendy fourth condition says 10 is greater than one and 10 is not equal to one. So what's what's the difference in here? Well, in here you can see else if and in here is only the If so, as you can see in here, it brings the same thing. Because this is still true. Right then is still bigger than one. But then it's also not equal to one. And since we since this is a completely different condition, it will also be a vary ated, even though this was true. Okay, so then this Linus also printed and this is skipped. Okay, So the else else branch is skipped. Then we get to the fifth condition. Sorry. And it says they are not equal. Eso what? While we go inside this and say then a smaller art includes you wanna? Well, that is just not true. So we continue we skip this line and we continue with the else f So 10 is equal to one. That is also not true. So we skipped this line and continue with this else if then is not equal to one. So yeah, that is true. And we print this line. Okay, so they are not equal. And then even though bigger number is greater than small number, this line will not be fronted because this was true and this statement gets skipped. Okay, so let's continue with the sixth condition. As you can see, Prince, they are not equal. Why? Well, the it just is just the owner differences with the else, right? There is no else in this inside here. So once again this condition is false. This one is also false. This one is true. But since this is a completely different condition, we don't skip it. But we still evaluated so in here it also says bigger is greater. So this line Okay, so this is also go that we evaluated. Cool. Let's go to the seventh condition. So in here it gets bring the second. And why is that? Well, bigger is greater than smaller. It's true, right then is bigger than one bad then this smaller than one is false because then is bigger so true and false. This is the end operator will result into false right true and false this false. So this whole condition it's false, right? So this line will not be executed. But then when we go inside here, it says bigger number is greater than small number That is true. And then inside here it says 10 is smaller than one so that it's false, right? But in here we have the negation. So in the gate falls that will result into true And then we have true and true. And this is so this whole condition is true. And then we bring this line. Okay, I hope this makes sense. I'm not sure whether it does, so Yeah, if it doesn't, don't worry about it, right. It's just OK. So this is a bit complicated stuff and the eighth condition prints out first. And why's that? Well, inside here we check with a bigger number is greater than small number. And it is because 10 is greater than one right? And this or even does it doesn't even matter what this will result into. So even though 10 is smaller, den one is false. So this is false. This is true. And Derris or so that means this whole condition is true. So that means this line sprinted and this whole code is being skipped. So yeah, I hope you understand most of it, right? You should be able to understand that these thesis symbol conditions And if you don't understand these last two, it's OK. Don't worry about it. And yet So if you have any questions, feel free to ask and I will see you next time. 4. 04 switch: Well, hello, gas. And welcome to this lecture and this lecture. We will talk about the switch statements. So let's get into it in here. I will define a variable. Let's killed a swan. I'm switched. So this will be the variable debt is being switched on, and I will set it to five. OK, so this is the variable. And let's also define other variables still in teachers. So some number and let's go this one result like this and set it to zero Cool. So right now, let's define the switch. So simply writes rich that parentheses inside the parentheses is the variable that is being switched on. So in this case, switched and then curly brackets. So okay, And inside here we want to define the cases. So case then D number. So, for example, it one den comb and then we want to said the result, for example, so resolve will be equal to 10 for some reason, right? This is only for demonstration purposes. And another thing I want to mention is that I actually make a mistake in the previous video , and I want to say that the every case have to have a break at the end. Okay, so it doesn't even matter which cases that it have to have a break at the end. Okay, cool. So let's define another case statement. So case, let's say free and in here we want to said the result to, for example, 30. Okay. And then break out. So break like this. Let's also make another case. Let's go This 15 And then we want to send the results to 50 like this and also break out like this. And let's also use the default case like this and it have no value in there. So like this and said the results to 100 cool. And also d break. So even the default case have to have a break inside here. Cool. So right now what we can do is spring the results, So council, Dad, Right line, right line. And inside here we want to bring do result like this. So, yeah, let's run this application. And I want you to think about what will be the result, and I'm about to show you. So pause the video. Here it is. It's 50. Why's that is you can see 50. Why is that well switched a sequel to 50. We go to case 11 is not equal to five. Sorry, one is not equal to five. So this will be skipped. Then we compare five and free. They are not equal, so this will be skipped. Then we compare five and five. They are equal. So this will happen. This line will be executed and then we break out off this whole switch. Okay, So if I, for example, change this to seven and the run this application, it says 100. Why's that, right? As you can see 100. So why is that? Well, we come to five and seven is not equal to five, right? So there's default branch takes place and we said the results to 100. So then we break out and then we print it. Another thing I want to mention is that these ceviche statement can be replaced by the if statement. So if you want, I can write it. So at least the first few cases. So in here I can write if one is equal to switched. I want to do this thing. Then I can write else if and right free is equal to switched. You probably get the idea right. I compare all these cases too stretched. If they are equal, I do whatever is in here, right? And yes. So this is how we can revive this, and the default will be else. Right? So else and then there will be result equal to 100. Okay, so there are. There's one more case I forget about so like this and in here is it's this five, right? And in here it's us 50. So North, 35 But 50 like that soap. This is equal to this. They are the same, right? So even though this does use a if statement and disease a switch statement, you can decide which one you like better. I usually use if and most of the programmers, I believe use if and else of branches. But yes, sometimes there are a case where you want to use switch. It doesn't happen very often. Mostly you want to use f. Okay, so it's definitely better to know if condition. But it's also good to know D switch and how it works. So cool. That's pretty much it for this video. If you have any questions, feel free to ask and I will see you next time 5. 05 array: Well, l guess and welcome to this lecture. In this lecture, we will talk about the race. So let's get into it in here. I will define a new right, and this story will contain some numbers. So, for example, end. And then I read the square brackets and insiders, right? Ages. So this will be like some h off some persons, Maybe. I know. And then let's also initialize this. So I will set it to curly braces. And inside here I will define a few elements. So, for example, CNN, then I worked coma to separate these 5 12 Let's say 20 on. Let's say aiding. Okay. So you can ride. How? Whatever number you won't write. Obviously, this is just a demonstration. Okay, so let's do something. Let's bring to the number dentists on in the zero. Okay, So, council, that right line like this and in here, we going to write, for example, number on index zero. And in here, we want to print it. So as in previous lectures, when we want to can captain eight a string and number, we used this plus operation and inside here we can write the variable. So ages then we want to refer to the element on index zero, which is which we can do like this. So squared briquettes and inside it. Zero Sodi index. Okay, so this will take out students then, Okay, and I and the line. So there's this should brain number on in the zero is 10. Cool. Let's just change some number or let's do another thing. Let's define a new variable call. It will be a integer and let's go this want I know own index to and we'll set it sooty agent on index to like this. So I will leave it up to you to figure out which number it should be. And I will also print it so that we can see it's right line and the in here, let's say age on index to right and let's say it like this and let's bring the on index to cool. So yeah, let's do another thing. Let's change the H on index to so ages on index Sue will be equal to we can assign it to some number like this. We can assign it to some results off some operation like this, but we can also assign it sue the result of some variable Plus something. Maybe So let's do it like this. So ages on index soup plus one. So I will once again leave it up to you. What? This will result into whether it will be a error or something like that or ready it will just work somehow bad. Yeah, I will leave it up to you. So you figure it out and let's also print it out. So Conso, right line and let's say each on index to it. ISS the ages on index sue like this, right? So then let's also figure out whether this variable is being changed. Because in year we change the H on index to and in here we assign it right. We set the value off this variable to the age on index to write. So will this variable change. I will leave it after you to figure this out. I will not spoil anything for you, but yes, so let's bring it out. So let's say on index to will be equal to the own index to variable, Right? So on index to cool an nd line using semi coin. So yeah, cool one. We can do now is, for example, work with strengths. So string and it will be once again a array called names. And yes, all right, forget about the equal sign and let's put there some names. So, Adam, then I know Eva. Then, for example, Well, and let's do another one. So, Emily Okay, so these will be our names, and we can do the same stuff as with the numbers, right? So we can set it to some variables. String name will be equal to names on index on no one. Right. We can change the values. So, for example, names on index one is equal to no Peter. Okay. And let's also bring desu out so council and does a great line. And let's bring d name. And let's also bring the names on index one. So, Consul, the right line and in here, let's write names on index One like this, So yeah, I will just run the application. You figure out what is the what will be printed. Okay. And pause the video because I'm about to show you cool. So as you can see, number on index zero s, then. So ages on in the zero istan. Okay, then we store D number on in Next to that means this 12th 2 on index to variable. And then we printed it. So it says 12. Cool. That's okay then. This land may be a bit tricky for you, but how computer Various distinct ISS. He takes a look at the argument first. Okay, so at the devalue, he first computes the value that he is assigning to the variable in here. Okay, so he takes a look at whatever its store in here, that's 12. Then he do this plus one. So that means this will be 30. And then he will set ages on index to to the 30. Okay, so then when we bring dead, it says 13 in here. Cool. And this variable was not effective. So why is that? Well, because when we created this variable it, the computer creates a space in memory, right? So we have a completely different space in memory than G array is using. Okay, so we just set a value to a completely different space and memory, so it doesn't make sense when we want to change these d d memory in array. It does not have any effect on the different space and memory on this variable on index to write. So yes. Oh, So if you thought this will be also 13 than you were wrong, OK? But that's OK. Everybody makes mistakes. And yeah, let's also take a look at the strengths. These will works exactly the same. Okay, I just want to demonstrate that it bring my Doesn't matter about the data type. The array work is the same for any date attack. Okay, so in here, I defined a new array, and I start the value on index one. So that means Eva and I changed it to Peter. So then when I print the variable, it's is Eva. And the name on index one is changed to Peter. Okay, So the Eva is not there anymore. And that is pretty much it for this lecture. If you have any questions, feel free to ask and I will see you next time. 6. 06 for: Well, hell, guy send Welcome to this lecture and this, like travel. Talk about the four loop. So let's get into it. First of all, let me just define a new variable and let's go to Swan Temporary so temp. And I will set it to one. And I want to show you a to new operations. Dad, we will use in before cycle. So temp plus plus and also Samp minus minus. So what these do? Well, the 1st 1 is called increment and what it does. Well, it is the same as writing. Tim is equal to tempt plus one. So it basically adds one to the value that is stored in temp. And then it stores the result into temp. Okay, so these two lines are the same. And these this minus minus means decry meant and dead means basically this subtract one from the temp variable. These two lines are runs again. Same. So if I bring that guns sold out the right line on the screen. So in here I will write them, and underneath I will write them again. So if I run this as you probably figured out, this one brings to and this one, prince one. Why is that? Well, it is equal to one in here we implemented. So we add one to it. That means Sue printed out. Then in here we decry meant it. So subtract one from it. That means it will be one and we print it and it's as one cool. So we cleared that out and let's define the cycles. So let's find the first cycle. So I'll just once again brained the number off cycle. So this will be the first cycle or loop if you want it pretty much. Doesn't matter what you want to use. Maybe group is better, but yeah, whatever. So let's define the loop in here. We will define a variable that we will use in the four so end. I will be equal to zero. We usually use I, k or J. Okay, so I then J and then K, it's just some convention. I'm not sure why, but pretty much every programmer used this, so you should probably too. Then let's loop while this condition is met. So while I a smaller than five, for example, and then in here is the final expression. What that means Well, this is expression will take place at the end off each iteration. So once we go through all of the instructions that are in here. So let's put some instructions inside. Here council dot Right line. And in here we want to prove, friend something like value off I is. And then we bring the I. So plus I so yeah, let me just go through it once again we initialized I zero and then we can use this. I variable inside this for loop. We will loop while I is smaller than five. And then we will at the end off each iteration, we will increment I Okay, so if I run this as you can see excess first loop and then value off I is equal to zero. Then it says value off. I is one. And why is that? Well, this final expression took place because computer evaluated this line and then gets to the end of this for loot. Right? So that means this thing in here will be evaluated. And as I explained earlier, it adds one to dis variable. So too I So then we check 40 condition and I is still smaller than five. So we once again go through the whole body. Okay, so we once again brings value off. I is one. Then we get to end increments. I check for this condition. It's still true. So we continue and print value off ice too. Do the same ones again. Loop through all of this And then we get to the point where value if I is equal to four. So we print it. We get to the end right to here. We increment. I So that means I is now five. And when we check for this condition five is not smaller than five, right? So we break out of this four room and continue in here. So let me also show you something and that is that I will just close this thing. And that is that This loop is a curve. Ireland to this loop. Okay, so if I run this using control and f five as against see, it brings exactly the same. So that means this This is the final expression that we have in here. And it's OK. It can be It doesn't necessarily have to be in here. We can just put it inside here, but it's usual to write it inside here, so you don't forget to increment it. It's a usual mistake from for programmer to do something like Well, not with the for loop bad. If you don't use the final expression to increment the I variable, you may want to do a mistake like this one. Where if I run this program, it will cycle forever. As you can see, it's still brains value off the wary off eyes equal to zero. And why is that? Well, we don't increment I and this condition is true, but it's it's still true. So this will cycle and the computer will print this nine forever. Okay, so I will just close this and yet so make sure to increment the I like this. Another thing you may want to do is say I s equal to five and we will cycle while I s greater than zero, and we will decry meant I. So you may want to pause the video and try to figure out what will be printed. And you may want to Bella's now, because I will. I am about to show you do result, and as you can see it's a spy. Four. Free to one. Why is that? Well, we determined in here and we start at five. So it brings value off iess five. Cool, then we d command. And then we took for condition. Okay, so this is basically the for loop. Let's do another thing. So we'll have to do a second loop like this and let's do something with array. So let's to find a string ray. You can use it like this and let's go his one names and it will be once again the array of names I know a vah Adam I think we used in the previous example then Duke that many. Hey, And then, for example, Peter Cool. And let's close this thing up. So right now I would like to cycle or loop through this race. So that means I would like to go from Index Zero Sudi and off the array. So let's do that. Using four cycle four right now, I would like to define deep new variable once again. I will call it I and started to zero because we want to start at index zero. Right then I write Sema corn in here. I ride the condition. The ending condition. So in other words, in here I define how long do I want to loop? So I want to lube while I is smaller than the length of names. So then the number off names that we have in here, so names that length, then another semi corn. And I would like to increment I each inspiration. So why I would like to increment I well, to get to the next name. Right, Because the index starts at 012 and free. Okay. And when we increment is just moving in the array, basically. So right now, what I can do is council that right line. And inside here I will bring the something like value on index. Then I would like to bring the I and I will set it like it's equal to. And then I would like to bring the actual name. So names on index, I cool. So right now, if I run this program, it should bring all the names. So as you can see, it does. Why is that? Well, we started at zero. Okay, we gyo inside his loot. Well, first of all, we checked the condition and I is smaller than names. Length. This is true because the there are four names, right? So names that length is four. So zero is smaller than four. So we go inside here and print out value on index zero is equal to Eva. Okay, because Eva is on index zero Cool ones. We burn this, we increment I because this is the final expression that takes place at the end of the cycle. Okay, so we increments. I I is now one and we once again check the condition. So one is smaller than four. That's true. So we once again bring d name that this time it's Adam and once again re increments. I I is now too. And we check whether it is smaller than for It is so We bring in value on index to its look once again increments I So I is now free. Free is smaller than four. So we friend vary on index free is equal to Peter. Okay, then we increment I So I is now four and for is not smaller than four, right? They are equal And that means we can break out of the cycle. So computer breaks out of this cycle and ends up somewhere in here. Bad. Yeah. There are no other lines off go to execute. So the program just ends. Okay, Cool. Let's do another one. So, for example, right now I would like to yet another thing I want to mention I forget to mention it is that there is no problem with this and I being initialized twice, right? Usually, if I would like initialize detain variable again. Well, sorry. Declare the temporary ever again. I would get an error because this variable is already somewhere in memory. Right? I already have a space in memory that is referred by the temp name, right. So I cannot have two spaces in memory that have the same name, right? It doesn't make sense. So why is it possible to have the I declare twice right in here? I right in the eye and in here I right into dry. Well, then is because this I is basically lives only inside this four cycle. So once we get behind this four cycle, we cannot refer to this. I So if I, for example, to try to bring the I in here going so that right line, I I will get an error. So if I run this in here, you should see some error. Yeah, it says never built errors. Would you like to continue? No, I would not. And in here it says the name I does not exist in the current content because the I exists only inside this four loop. Ok, cool. So another thing I can do this. I can the finding I in here like this. Okay, so this will also work, and I need to put some going inside here. And if I run this program right now, it says an error yet and that is because in here, a local para meter off I is declared already declared, and that is because it is right here. Okay. So even though it is under this four cycle, I cannot declared it twice. Right? So this is a bit weird, but that is just how things work. We get Teoh. Yeah, it's just how things work. So for example, if I would like to do it like this So I declare a new variable called eye and I said it zero Then inside his four cycle. I can use this variable because it is declared in front of this four cycles. So it lifts also inside here. And I just said it to five. So this will be executed only once, and then I will live through it. So yeah, the same way is before. And then I can use the same variable inside here. Okay, So if I run this as you can see, Edwards just fine, right? Everything is fine. And inside here, I can bring the I. So, as you can see in here is four. And why is that? Well, it makes sense, because the last time we went into this four cycle, we printed value off on index. I is free and it's equal to Peter. So the last night last name, then we incremental die. So we said it to four and we checked whether it is smaller than the length of our names, right? And it was not so we braked out and the value of I still for four, right? It doesn't change anywhere in here. And we can refer to the I because it lifts in the global scope, right in the global content. If you want. So, yeah, this is a maybe a bit complicated stuff, right? You have a local variable. Kinda. So if you define it in here, it lives only in the four cycle. If you define and globally, it lifts anywhere. Cool. I hope that makes sense. If you have any questions, feel free to ask and I will see you next time. 7. 07 while: Well, hello, Gas and well counted his lecture in this lecture. We will talk about the wow loop. So let's get into it. I'll just define a new variable cold temp and it will be a in teacher so into temp and I'll set it to zero. And right now is to find the Wile cycle. The wild cycle is a bit simpler, Dendy four cycle since we simply right while then parentheses in which will be the condition and only the condition and then the body off the vile cycle. So in here we have the instructions that will be executed. And in here we will have the ending condition. So for example, let's say while temp is smaller than five, we want to increments damp, so temp plus plus and yeah, that's it. After the cycle, we will print it. So council, that right line right line like this. And in here I will write just EMP. Okay, I can I could I could write something like temp variable is equal to And then the attempt that it is just demonstration purposes, right? So, yeah, you should try to figure out what will be in the temporary ever the wild loop. Basically, what it does is it loops, Rudy body in here while this condition is true, right, It's kind of it's maybe a bit less complicated than the four loop where we can initialize the variable. Then there is the final expression and it's gonna more stuff in the for loop. The wire loop is just simpler, right is just While this is true, do this right. It's just simple. So maybe 40 beginner. The wire loop is better, but I will leave that up to you. What? What kind of cycle do you like? Cool. So let's define the 2nd 1 So in here I will define a ray, and I will show you that we can move through array even in even using the while cycle. Okay, so let's go. This one just a r r. And in here I will put some numbers. So then 2030 40 just to make things simple. And in here I will once again to find the while loop and yeah, I would also like to define the I variable right, So the same I very about that we have in the for loop lecture, so I will be equal to zero because we want to start at zero at index zero I as a index, and we want to loop while I smaller than the length of our array. So then the numbers that the number off elements in our array in this case for cool, then curly braces and inside here we want to, for example, brandy number. So console dot right line. And inside here we want to ride the are so element on index I from the r a r r Ray and yeah , we also want to increment I so basically move on. India Rey, right. So in Normandy, Index, then we once again incrementally index and throughout this whole alteration. So that means we will go through every element. And once we get to the end this I will be equal to the length and we will break out. Okay, So if I run this, maybe you can bring you think you can write on paper not brained, but right on paper. What do you think will be printed and yet and pulls a video? Because I'm about to show you the result? And as you can see, it says five. Why is that? Well, the 10 variable is equal to zero. But while temp is smaller than five, we increments temp. So that means temp will be one. Then we once again check. One is still smaller than five. Well, you runs again increments. So it will be two to is smaller than five. It will be free. Free is smaller than five. Well before for a smaller than for half, it will be five. And then finally five is not smaller than five. So we will break out of this wild cycle and printed. So as you can see in here it is five. And then, as you can see in here, we loop like we luv throughout this whole array. Right? So for each element, we printed it. And why is that? Well, this thing is basically the for loop. It's just the same. Only the declaration part is in front of the loop. The ending condition is inside here, and the final expression is a D end. OK, but it works just the same as the four loop. So yet another thing I want to mention is that you can do stuff like break out of the cycle So why? And yes. Well, not necessarily wide. This is just a like demonstration, but 40 demonstration purposes. I will just say while if temp is greater than free I want to break out. So in here I just write break. And then Symbicort, okay? And I don't know why. So this is just a demonstration that this actually works that this break will actually break out of this wild cycle even though this condition is still true. So if I once again runs this application, as you can see, it's us four in here. And why is that? Well, we g o an increment temp. And when temp is four, this condition is still true because four is smaller than five bod. This condition is this condition is also true, right? Temp is greater than free, right? Four is greater than free. So we'll break out of this cycle. We will not increment temp. So temp is still four. And then when we print it, it says four, right? So as you can see in here, this thing doesn't change because we didn't change any code. But yes. So this is how he can use the break in your code, and this is pretty much the wild cycle. So you may want to use the wild cycle instead of the four. It's up to you. Which one do you prefer? I think the wild cycle is better. 40 Beginner bar eventually should be able to use all of these cycles. So, yeah, that's very much it for this lecture. If you have any questions, feel free to ask and I will see you next time. 8. 08 do while: Well, no gas Send Well countered his lecture. And there's like, true, we will talk about he do while cycle So let's get into it in here. I will once again to find a new variable. It will be just a number and I'll set it to, let's say 10. And in here I will Ready Do wild cycle. So I want to do something that is indeed body right inside these two parentheses. And I want to do this while this condition Ismet ok, and I must put a semi coin at the end of the slide. So inside the body, I can have, like, several instructions. How many? I won't. So, for example, I will increment I It doesn't matter what I put in here and then in here I will say while I a smaller dan zero. So right now I will just bring it out. So system Oh, sorry. It's in the council dot right line, right line. And in here I will bring to the I. So what do you think will be printed? Well, the 11 will be printed. And why is that? Well, the way d do while cycle works is that even though disconnection is false, right? I s 10 and 10 is not smaller than zero. This it doesn't know that computer doesn't know that when he of various divided. So the computer first do d body. Okay, so he increments I So he said it to 11 and then it gets to a while and said this condition right? And check this condition. Sorry. Check this condition and 11 is smaller. Debt is not smaller than zero. So it will break out of this cycle and continue with this line. So it will bring 11. Right? So this is basically the only difference that is between the while and do while cycle. I will just for demonstration purposes put a basically the same while cycle in here. So while I was smart and zero, I would like to increment I and then I would like to bring it. And as you will see, it will still be 11. So if I run this thing and show you it is still 11 why is that? Well, it starts at s 10. Okay, then it do this do while and increments I and goes to this condition since 11 is smaller, is not smaller. Denton zero. It will break out of this dual cycle so it won't go up again. But it will continue with the next line. So that means this first brained it will print 11. And then in world ridged is wild cycle, right? And while 11 is smaller than zero, we know that 11 is not smaller than zero, right? It is false, so this body will not be executed. Right? So this this whole block will be skipped and it will be Brent against, so it will once again Brende 11. So that is the only difference between while and do. I'll write. And the only difference is the time when we check the condition and the do while we check it at the end in the wild, we check it at the beginning, OK? And that's the only difference. So yeah, if you have any questions, feel free to ask End. I will see you next time 9. 09 function: Well, hello, guys. Send well counted his lecture in this lecture. I would like to talk about D functions. So let's get started. I created a new project, and in here we will define our first function. So and let's do it simpler inside here. Be right. First of all, rewrite public and then static. And why is that? Well, that's something that has to do with a object oriented programming. I will not get into that right now. It's a topic for another course, right? But yeah, just just when you write a function in C sharp simply right public static in front of it and everything should works just fine. OK, then we ride D data type off the returned value. So off the output. Okay, so it will be a in teacher and then we want to write the name of function. So for examples squared and then parentheses and inside the parentheses we write the arguments. So the list off arguments the function take there can be multiple arguments, but let's for now, say like this. So it will accept one argument called X. And then there is a body right now, it iss underlying it have read, underlining. Why is that? Well, that's just the visual studio telling us dead. This function is not to returning any value, right? So it means and things that we are done writing this function and it doesn't return anything. So he thinks it's a error, right? But But we will write a coat in here, So inside of here we will. Let's just define new, very difficult I and sent it to X Times X And we can also return it as a outfit. So return why like this? So this basically this line basically grabs whatever is stored in this y variable and returns it as a result. So what we can do now in the main function is defined a new variable gold temp Send it to five and weekend, for example, brained the result off off the East Grant go So council, that right line And inside here we can put the squared that will be called with, for example, five for simplicity and yeah, and we'll print it out. So let's see, how did works if I run this application? It says 25. Why is that? Well, when I put this thing inside the council. Right? Right line. It says squared five. So this function gets called and this X is equal to five. OK, so this five will be set as a value to this X. Okay. Then we get to this body and said I too, five times five, which is 25. And then we returned the eye as a result. Okay, so 25 will be returned from this function. So then this council right line takes the value and prints it out on screen. So that means that's why this is 25. I hope that makes sense. So maybe for simplicity, I can do something like result and set it to this. Okay, So said it to this, and then I will bring the result variable. So as you may figure out, it will be still 25 because right now it's still returns. 25 dysfunction call is still returning 25. And right now we are printing only a variable. Okay, cool. So another thing. Me, we can do this instead of this five. We can use a variable so we can write in here d tempt variable that we defined earlier and to change things up. I will set it to 10. Okay, So if I run this thing as you brotherly, figure out and will be 100 Okay. So why is that? Well, the computer takes a look at what is stored in the stem variable. It is 10. So he passed then into dysfunction. So X would be equal to 10 then inside here it says I will be equal to 10 times 10 which is 100 it will return 100 as a result. So then this result variable is equal to 100 it will be printed. Okay, so that's why in here is 100. Cool. So let's do another thing. So function doesn't necessarily have to return a value, so it can be something like public static. So these are the two words that we right in front, off all functions. And right now we want to write a function that is not returning us anything. It will, for example, just bring a number. Okay, so it will just bring a number on screen. So right now, if I want to do it at, I will write void. That means this function is not returning any value. So that means the output off this function is nothing. And let's go this one brain number and I will pass a number number two dysfunction so I can call it however I want. So, for example, number It doesn't necessarily have to be X. Okay. And since this is right, there is nowhere underlining because we don't have to return any value and let's print it out. So council the right line and in here, let's bring the number. And let's also say something like number and is number, okay? And don't forget about the Sema corn. So right now I can do I can call this function so I can instead of this this council right line, I can use the function that I defined and in here, right, Bring number and I will bring d temp. And then I will bring another number. And that will be the result. So in here, I want to demonstrate that I can print I can use the function multiple times. Okay, so in here I used the same code multiple times. Okay. And then when I want to change something in here, I can do it only once. So If I, for example, want together it off this number, I can do it only once. But if I had these council right line copy and paste it in here right, two times, I would have to change it to times. Okay, so that is one of the reasons why we want to use functions. So if I run this, it should say, like number 10 and number 100 right? Yeah. Number 10 and number 100. So that is why we use functions, right? We don't want repeating code. We want decode that repeats somewhere. We want to write it inside some function. Cool. Let's do another one. So, for example, probably ecstatic. And this time we will return a Boolean Valley. So boo being like this and let's go. This one is bigger, so this one will accept to para meters, so there will be first number, and then there will be second number. Okay, And this function will return true if the first number is greater than the second number. Okay, so in here, I'll just create a new variable called temp, and I will set it to first is greater dandy Second right. And if the first is greater than the second we return true and otherwise were returned false. So basically we are returning whatever is stored in this temp variable. So, like this bar, how do we decide which argument will be which right so far we have only one argument in each function. So how can we decide So first of all, I will just red line and inside here I will bring d results. So let's say is bigger and the as you can see in here it's us in first and then in second I'm not sure whether you can see it. It's pretty small, but the first number that be right will be set to the first and the second will be the second. So right now we are checking weather 10 is greater den 20 and then is not greater than 20. So the stamp will be false and we will also returned the false. So if I run this thing using control and five as you can see, a prince falls so yeah, this is how you can use functions. And another thing I want to mention is that you can use this in a if statement for example , so like this. So if let's say 20 is bigger, Dan 10. I want to brings the result variable again. OK, so friend number and then result first some reason is just don't try to find and he sends behind all of this code. It just doesn't make sense because it should not make any smart application. It's just for demonstration purposes. Okay, so in here it says number ISS 100 again. Why is that? Well, in this function, call 20 is first and 10 is second okay. And 20 is greater than 10. So this is true, right? And if in the returns true this condition is true is Matt and this killed inside this body is evaluated and that means it will bring number is 100. So yeah, this is pretty much it. This is how the function works. And I know these functions are a bit complicated topic and this thing doesn't make any sense to you, so just don't worry about it, but yes, So that's all it is. It's not so complicated if you really think about it and if you give it like maybe a few hours so it's just you just defining something that you can call over and over again. For example, in here. Okay. So, yeah, that's pretty much it. If you have any questions, feel free to ask. End. I will see you next time. 10. 10 calculator: well l gas and welcome to this lecture. In this lecture, we will create our first application. So let's get into it. First of all, I want to show you how you can take input from user. So basically, remember that we have a council application and user can write something in there. So, for example, a number and you want to be able to get the number right and store it somewhere in memory. So somewhere in variable. So in order to do that, he can use something like indie juror, then the name of the variable, and it will be equal to counsel. Dad, read line. So we are not writing. We are reading the line that use a road. And since this line a string and it cannot be said to him Teacher, we also need to change the data type. Okay, so there is a function that is used to do that. So this is why I talked about the abstraction and function, right? I don't necessarily have to know how the function death takes drink and changes to in teacher is implemented inside. All I need to know is that it takes string and returns into your Okay, So it is a function gold bars and yeah, it takes the string. So that means this thing, this is a string and it will return in Teacher Cool. So right now I can bring it out. So console Dodd right line. And in here I will write the attempt. So if I run this thing, it will. First of all, it shows nothing, right? But there's a cursor. So if I, for example, right 100 in here and hit enter this Lang will take the 100. This thing will change it to in teacher and internal storied as a value to this variable. And then this line will print it so cool. Right now, what we can do is define a calculator, so create a calculator. So I will change this to first. If the idea is that it takes one number and then it takes second number and it will bring doubt all the possible mathematical operations. Okay, so let's do it. I will take the first number. Then I will take the second number like this and I will print out or the operations so plus minus divide and times. Okay. Yeah, So let's do that right now. What we can do is defined the results. So, for example, end and let's say this one results on, maybe it doesn't matter and set it to first blast second. Like this? Yeah, and it's get idea to right all of these in these same conventions. So if you write the first variable with a lower case, you don't want to write these second with uppercase. Okay, so you want to keep these same conventions throughout your code, and then I would like to print it out. So, for example, first, then I would like to bring to the plus sign like this. And then I would like to bring the second So the value that use road as a second Then I would like to bring the equal, and then I would like to bring the result. So like this que Right now, what I can do is use these two lines and do all of the other operations so minus. And let's also change this one and let's go this one just result, okay? And yes, so in here, we don't need the result very ever anymore. We don't need the value that is stored in there so we can just override it by the new result. Right? So in here I will change this to minus so first minus second will be equal to for his nine . A second right that is stored in the result. Then we do the Al just copy based it and duty, divide and times. So divide and same thing in here. Yeah, pressing the insert button and it is in here. So divide, divide and in here will be times, times and times. So, yes, this is pretty much it. So if I run this application, it shit's first of all, it starts and then it asks me for a number. So I will say, Let's say, 10. The second number will be five and it brings out all the operations. So 10 plus five is 15 day in 10 minus five. It's five, then divided by five is two. 10 times five is 50. So that is skilled that it's so so cool, right? And another thing we can do has sprained before we accept the number of bring something on screen. So the use or know what he is kind of given us right. So let's let's do that simply right. Council and in here, Right? So we don't want to end the line after re right after we bring out the argument. We simply want to print it out and then stay on the same line. Okay, so in here I will write first number like this. And then I will bring second number in here. And once again, I don't want to end delight. I just want to let the user know Daddy, he is inserting the first number and then the second. So if I run this as you can see it, ask first number. I've Oh, let's change things up and say 50 and the second number will be 10. And as you can see, the result off all of these. And yes, so it works. It works. So this is the first application dead you created. And yeah, you have a working calculator, so you can use it whenever you want. You can send it to your friends and do whatever you want. So if you have any questions if something isn't working, feel free to ask and I will see you next time.