 do a brief review of the last lecture, then I would like to show you some more dumbbells. This time we'll look at a dumbbell called turtle dumbbell, a more specifically K-turtle dumbbell. That dumbbell doesn't do conventional computations alone, it actually draws nice pictures. So we'll probably have a demo, you will have in fact some exercise in the lab to do when you go to the lab. Then we'll have a very brief introduction to the lab where you will see the real dumbbell. All these are abstractions, what you see are real computers inside the labs where you will map all these abstractions onto what you see there. In the last lecture we typically prepared a simplified model of computing. We concluded that the computer is a dumb machine but it can exchange and manipulate data. It can execute given instructions and it can store a pre-written program that is a set of instructions and automatically execute all these instructions in the stipulated sequence. So given, say, 25 instructions in a sequence, Mr. Dumbo will execute all of those 25 exactly first, second, third, fourth, fifth, etc. So we concluded that there is one, some kind of a senior Dumbo and there are a lot of junior Dumbo's. So this was our simplified model. Using this model, we actually met a Dumbo called C++ Dumbo who can store data values in memory locations identified by given names. We also saw briefly that data can be numeric string. There are other types which you shall see later. And Dumbo also has specific instructions for input and output. For the C++ Dumbo, we saw them as C in and C out. We believe that Mr. Dumbo can do arithmetic operations, can do logical comparisons, can do string manipulation, etc. And we had written two programs in C++. Actually there were some deliberate errors in those programs because I had some quizzes following that but the time ended so I could not give you the quiz. So we will have the quiz right now. We will revisit the programs of course this time. The errors have been eliminated but still there is a quiz which I have replaced in the second session slides also. So this is a set of instructions written for our C++ Dumbo. We specifically noted that we do not know what include IoStream and using namespace std semicolon means but we just said we have write it for the time being. We saw that this is a comment. So this is not meant for Dumbo but meant for human readers. We saw the keyword main. Main is the name of the program which we are trying to execute. Later on we shall see that there could be many such program modules. So this is actually a module called a function. We shall come to these nomenclatures later. Inside it we saw that we have two names defined A and B as integer numbers then missing out of the first later in that slide. I think I will try to be careful in future. But this program is easily understood by everybody. There is no confusion there. It is a very simple program. One specific thing that I would like to bring out is what is called the correct syntax. Syntax is the word that we use for writing proper grammar and spelling in any language. So there is also a syntax for computer languages. C++ syntax demands that C out which is actually a function in the IoStream class. C out and C in these are called special functions. And in these classes the less, less and greater, greater symbols actually are insertion operators. So each operator works on one particular element at a time and that is the reason why you will see here. That is why you will see here C out. There is a greater, greater sign here followed by one string followed by another less, less sign followed by backslash n. We have a quiz on this. So I input two numbers, calculate the sum and print the sum. So this is a string being put out. Then this is the name being put out which means its value will be printed and this is again followed by some funny character of backslash n. These programs are simple. This is another program which calculates Fahrenheit temperature for a given centigrade degree value. Again common sense. There is only one issue which we have not discussed but we will discuss later in details when we study the concepts of different types of data and the evaluation of expression that happens in C++. Every programming language has a peculiar way of calculating values. So for example what should be the value that would be returned by 9 by 5 or C multiplied by 9 by 5. It's a moot point whether it will, this division will be resulting in an integer value or a fractional value, et cetera, et cetera. We have a quiz on that. Here is the first quiz. Approximately how many different programming languages have been defined so far by computer scientists? You have heard of some. Yesterday we spoke of Fortran, we spoke of Kobal, spoke of Algal and then we said C. I also mentioned the other programming language called D, et cetera. So any guesses? Anybody for A? No, no. We will not use voice words. We will use hand words. So A, nobody. B, fairly large number of people believe that the programming languages are between 6 to 20. Good guess. C, large number, 21 to 100. D, equally divided. The actual answer is D, many more than 100. In fact when I started studying programming language history in late 70s, there were about 520 known languages and that is because unlike human languages, which have to evolve within a group of human beings. Unlike those, a computer programming language can be defined by one scientist and used only by him or her. There are a large number of languages which are used, which were defined by one scientist and used by that scientist and two of his or her PhD students. That's all. But the language exists, there is documentation and there is an implementation. That means that language can actually run on some computer. What's the point of this quiz? The point of this quiz is never ever in your life talk about I know C++, I know Java, I know C. That is the most nonsensical statement you can ever make. Because today you know some programming language. Five years later, a completely new programming language comes in and a large number of people in the world are solving problems using that programming language. Do you mean to say you will have to study a one semester long course in that language? It's bunk up. There are a few programming paradigms. One paradigm is called procedural programming. The second paradigm is called object oriented paradigm. C++ incidentally belongs to the second class. And the third paradigm is called functional programming. These are the three different approaches of giving instructions to Mr. Dumbo. In each approach, there are programming languages. There are programming languages which follow one of these two approaches, but one of these three approaches, but also has fundamentals of computing from the other approach as well. What we need to understand is the principles of programming, concepts behind programming. The language is absolutely incident. So never even ever tell anybody that you know this programming language, you know that programming. Anybody who makes that statement in IIT, most of us laugh at that. What it means, you know, if you say I know three programming languages, that you mean to say that you know only three upon six hundred, assuming there are six hundred programming languages, that means one upon two hundred. That means you know only point five percent of the programming knowledge. And IIT are knowing only point five percent of the programming knowledge is a useless IIT. What you should say is I know programming concepts, I know programming principles, and I have used those principles in this or that or that programming language to write programs. But given another programming language which follows the same paradigm, I can learn the syntax of that programming language in seven days and seven nights flat, and I'll become an expert programmer in that program. If you cannot, then you have not learned programming. And that's the reason why we are consistently looking at Mr. Dumbo, not through the exact wording and syntax alone, but also what are the features and capabilities of that dumbo. So please concentrate on the programming principles. The languages are incident. Of course, we have to use some language. Comparing it with the natural languages, I would say that when people say I know Hindi or Tamil or I know Gujarati or I know French, I ask this question. Do you know how to think clearly? Because if you can't think clearly, then whatever you express will be lousy in whichever language. If you can think clearly, it is quite likely that any language that you use your expression will be very accurate. So the right thinking is what is the most important. Sorry for spending some time, but I saw a whole lot of people claiming I know this programming language, that program. Never compare or never bring the learning of a particular programming language into something else. Bring the principles of programming that you have learned there. And if you haven't, this is the time to learn them. So don't worry about number of programming. Here is that funny simple backslash and we don't have time to take a vote on this. So we'll just conclude. When I say C out less less F less less backslash N, the backslash N does not print as backslash N does not print as N. It actually creates an end of line. So that means the printer output or the terminal output goes on to the next slide. This is useful. Otherwise a whole lot of jumbling will occur on the output that Mr. Dumbo creates for you. You want that output to be easily discernible. And it is a good practice that for every set of values that you put, you always insert a backslash N. A backslash N stands for a new line character. So you go to the new line there. Nothing great. Here is quiz three. This expression evaluates to 21 in C plus plus is a computational logic. My colleague Dr. Sanamurthy had either filmed this question or found this question. It's an interesting question because it tries to understand the syntax and the associated semantics. Syntax is the way expressions are written and semantics is what that expression means. For example, five by four plus 20. Three star one plus six star you can guess to be multiplication symbol. Now if you interpret this three star one plus six as six plus one seven multiplied by three you get 21. But if you interpret this three into one you get three and then at six you don't get 20. The syntax in C says three in bracket seven. Any ordinary human being who has learned some maths will interpret this properly to mean three into seven. But Mr. Dumbo may not understand this. These are the squiggles. The real googly is D, none of these or E, all of these. A. Very sure it is A. What if five divided by four results in an integer value and the rest of the fraction is truncated it will result in one. One plus 20 is 21. Correct. What if it results in a floating point value or a real value? No? Yes. The answer is we don't know at this stage. We have not studied how Mr. Dumbo evaluates expression. The only purpose of this quiz is to emphasize is that whenever we write expression it is absolutely important for us to understand exactly how that expression will be evaluated by Dumbo, whichever be the programming language. Whatever are the rules in that programming language to evaluate expressions must be understood clearly by us. That's all. We'll now look at more on computing. So far we have seen that Dumbo can execute given instructions sequentially. But is that sufficient? Well may not be. In fact most probably it is not because not everything can be solved by writing instructions one after another. We took an example of a bicycle ride or a car ride. We said we'll go straight at certain speed in the car. But we also said that if there is a buffalo we'll stop or we will steer right. Note the question if there is a buffalo. Normal instruction is keep going straight. But if there is something else that is happening which is not pursued originally then don't go straight turn right. Now this kind of decision making capability has to be available with Mr. Dumbo even for computational purpose. So that is what we mean by saying that if we do not want Dumbo to always execute instructions in the given sequence then Dumbo needs some additional capability. And these capabilities are in terms of the ability to make decisions and concurrent with that ability because decision will say what? You ask a question yourself yes or no. Is there a buffalo? Yes. No buffalo no. So if yes what do I do? Turn right. If no I go straight. What it means is I want to branch off to some other set of instructions in my program instead of carrying on with the sequential order. So these two capabilities are absolutely essential for writing any meaningful programs. We call them decision making capabilities. We'll look at some of the decision making capabilities here. Typically we ask a question to Mr. Dumbo involving a logical comparison. Obviously Dumbo is unable to understand whether there is a buffalo on the road or not because Dumbo deals only with values stored inside those memory locations. But Dumbo can definitely make comparisons for example. If n is a drawer or a location it can certainly check if n is greater than 5. That is a question. Is n greater than 5? Well the answer is either yes or no. And this is the fundamental decision making capability that all Dumbo's have. C++ Dumbo, 4-turn Dumbo, whatever, whatever. So they can look at, this is called a logical expression, comparison. Comparison always results in yes or no. Later on if you study some more things in databases for example you'll come across null values where the comparison does not necessarily result in a specific yes or no answer. I'll comment on it through another quiz later. But right now comments and says us that if I ask a question of this type answer is either yes or no. Depends on what is the value of n there in that room. So if the answer is yes I want to execute one set of instructions otherwise I wish to execute another set of instructions. This is very clear. The way C++ Dumbo is to be instructed to do either one or the other is to write these kind of instructions. Of course I have not written a complete program but if you read this intuitively the purpose will be clear. It says if n greater than 5 notice that there is a curly brass here and there is a closing curly brass here. So the set of curly brass encloses any number of instructions that you want to give. All those instructions will be executed if the answer is yes. Else plain English like meaning else means if not. If it is not so a is equal to 0, b is equal to 60. Is this clear? Please note that Dumbo's capability actually are extendable using exactly this kind of instruction making. For example inside this opening brass and closing brass I have written only two instructions which assign values to a and b. a is 23, b is 78 here. If n is not greater than 5 then a is set to 0 and b is set to 64. But it's not necessary that this should have two instructions. It can have 20 instructions. It can have 2,000 instructions and within these instructions there could be another if with its own opening brass and closing brass. Along with its else. And within that if there could be another if. This is called nesting of conditions. It is important to understand the flow of activities when the program instructions are executed. Let us very quickly look at what we call a flow chart. Is this visible? No not very enthusiastic guess. Last person can see this. So this is a diamond shape box. Suppose I have executed some instruction here, some instruction here and I have come to the decision making stage at this point. This is where Dumbo asked himself a question. Is n greater than 5? If it says yes then it will execute two instructions. Which were the two instructions? One would say a equal to 23 and the other would say b equal to 78. If the answer is no Mr. Dumbo will set a equal to 0 and it will set b equal to 64. What is important is after executing either these or these instruction Mr. Dumbo will carry out with the subsequent set of instruction. Sequential. So what is to be understood in this is that ordinarily Dumbo will execute instructions in sequence. But if you ask Dumbo to make a decision based on yes or no answer it will either execute this set or execute this set. This is pretty clear and simple. This can be used to extend Dumbo's capability to actually repetitively execute certain block of instructions. Why would you like to repeat instructions? Well we shall see the advantage of repeating some instructions. For example we ask Dumbo to draw one square. Now instead of giving him instructions again to draw a square suppose I want to draw three squares I will say count one two three and for every time repeat drawing of this square. So draw a square draw a triangle whatever. So anytime there is a repetitive action I would like to create a repetitive instruction for Mr. Dumbo. Although there are special syntax that is special provision how to provide for these repetition the basic logic for that repetition comes out of the availability of decision making capacity and of doing something if the answer is yes something else if the answer is no. Let us first read this program. It's a program segment not a complete program. Let us see if we can guess what Mr. Dumbo is doing here. The Dumbo is trying to check it actually starts with some number n which is some value. I have defined three names here n count and a name called n factorial. All of you can guess what n factorial should stand for factorial of n. You all know how to calculate factorial of n 1 into 2 into 3 into 4 into 5 into 6 etc etc up to n. Can you ever write a single expression if n is unknown. If n is 5 I can write n factorial is equal to 1 multiplied by 2 multiplied by 3 multiplied by 4 multiplied by 5. If n is 23 I can write a long expression along all this but if n is unknown at the time of writing program I can't write a single expression. So I will have to create a repetitive process of multiplication to finally get my factorial of n. In this particular example let us first analyze the program itself that's the harder way. Then we will look at the corresponding flow chart to understand how exactly the repetition is being set up. Here I take the input as n. I set the n factorial as 1. Initially I start with 1. What I do now is I have a very peculiar kind of instruction for my C++ numbo which says for C count equal to 1 semicolon count less than equal to n semicolon count plus plus this four instance says that just like in that if statement after this decision making block it is not a simple decision yes or no there is a block of instructions given. What is that block of instruction n factorial is equal to n factorial multiplied by count. n factorial equal to n factorial multiplied by count means whatever is the value in that n factorial multiplied by the current value of count. If count is 1 it will multiply it by 1. Count is 2 it will multiply by 2 and factorial will become 2. Then if I set count to 3 it will multiply 2 by 3 the value will become 6. Next time it will become 6 into 4 etc. So every time this block is executed if I ensure that the value of count is different every time and it increases by 1 then I will eventually calculate factorial up to whatever values of count I am multiplying it. So what this particular code is trying to do is for count equal to 1 count less than equal to n count plus plus means start the block with count equal to 1 that's the starting condition. Keep on repeating the instructions in that set till count is or as long as count is less than or equal to n. The moment count becomes greater than n get up and finally it says every time you execute the instruction after executing the instruction increase count by 1. Count plus plus is nothing but a very funny way of telling c plus plus dumbo to execute an instruction called count equal to count plus 1. Count equal to count plus 1 means whatever is the current value of count add 1 to it and put the resultant value back in count itself. It is called incrementing the count. Please note count equal to count plus 1 is not an equation. There is an expression called count plus 1. Current value of count is taken, 1 is added to it. Whatever is the result of that expression is to be put back on the left hand side. Left hand side is count. This count equal to count plus 1 is abbreviated in c plus plus is count plus plus. At the end you say factorial of n is n factor. The question is is this logic correct? First of all let us understand the logic. Please note down these three things in your notebook. For count equal to 1 count less than equal to 1 count plus plus and note down this instruction n factorial equal to n factorial start count. We will actually execute it to see whether we get the correct n factorial or not. If not we will make provision. Let us look at the flow chart through which dumbo will execute this. So what dumbo has done is it has just written the value for n and it has set n factorial to 1. That is the initial action dumbo has taken. Now the complicated instruction called for count equal to 1 count less than equal to n count plus plus. We have to write the way in which dumbo will work. The dumbo will actually set count equal to 1 here. It will then check. If yes what is it supposed to do? It is checking whether count is less than or equal to n. If count is indeed less than or equal to n it will execute that instruction written inside that for opening brass closing brass which is multiplied by n factorial sorry multiply n factorial which I write only as nf multiplied by count put the value back into nf. Please note nf on this paper is same as n factorial. After this after executing this instruction it will add 1 to the count because it is a repetition dumbo will go back. Will it go here or will it go here? Now if it goes here the meaning of repetition will be lost because it will again reset count to 1. So it will go back here. This is the crux of iteration. Start with some value of count check if count has gone beyond a certain value. If it has not that means it means that condition count is less than or equal to n. Keep doing this but count is incremented here. You go back do it go back do it somewhere or the other count will become greater than n. If count is no more less than or equal to n the answer will be no and you will come out here and what will you do? You will basically I was to draw a single block around all the instructions which constitute this entire repetitive instruction for Mr. Dumbo. Clearly the repetition part ends here. Does the repetition part start? Does it start here or does it start here? The repetition part starts here but the repetition instruction starts here. So as far as Dumbo is concerned this whole thing is one block. This is the block which constitutes an instruction to Mr. Dumbo to repeat. Repeat whatever instructions are given starting with count equal to 1 and continuing till count is less than equal to n but every time increasing the count by 1 but execute those instructions in between. This is a very neat way of doing things. Suppose n was 5 then effectively I want this repetition to done how many times? 5 times. Let us execute this algorithm for n equal to 3 and let us see we get correct value or not. Count is 1 and factorial is 1. First time I come here one is less than 3 so I am starting here by saying n is 3. So let's execute these iterations. First time this is called an iteration or repetition. First time what will happen? Count is 1, 1 is less than 3. I will come here. Count multiplied by nf. nf was 1 so the value of nf is 1 here and count is so this is nf and this is count. At the end of first iteration you agree? I will go back here. Count is 2 now is it less than equal to 3? Yes it is. I will again come out here. Multiply nf by count now count is 2, nf is 1 so the multiplication of nf will get me 2. So nf will now become 2. Come down here count is equal to count plus 1 that means count now becomes 3. So count becomes 3. What I am drawing is second iteration or second execution. At the end again I go back and check is count less than equal to 3? The answer is yes. Count is 3 but it is still less than or equal to 3. So since the answer is yes I will come out again here. nf is equal to nf multiplied by count that means 3 multiplied by 2 so nf will become 6. Come down here count will become count plus 1 it will become 4. Now I go back again and Dumbo checks is 4 less than equal to 3? No it is not. The answer is no. This time Dumbo will come out and it will print out the value of n factorial which is 6. So we confirm that Dumbo will yield the correct answer. This kind of hand execution by drawing a flow chart is often a good idea initially to validate whether your iterative statements or repetitive statements to Mr. Dumbo will execute correctly or not. Some special cases here. What if value of n is 0? You start with n equal to 0 here. Come out here. Count is 1. Is count less than equal to 0? No. So the answer will be no first time itself. It will come out. What will you print? 1. Factorial 0 is 1. Good. Correct answer. What if I give a value minus 23? n is minus 23. I come out here minus 23. n factorial is 1. Count is equal to 1. Is c count less than equal to n? c count is 1. n is minus 23. 1 is not less than equal to minus 23. Answer no. Mr. Dumbo comes out here. Next says print nf. n factorial is factorial minus 23 is equal to 1. Is that correct? What is factorial minus 23? Not defined. Mr. Dumbo doesn't care much for your mathematical definitions. What should we do to our program then? How should I modify the program? The simplest way is that once I read the value of n, I do a conditional test. Is n positive or 0 at least? So what will be the conditional execution? If n greater than equal to 0, then do all of that including repetition. Else nothing. Print, shout, shout, shout. So from Mr. Dumbo, the answer you should get it. Please do not ask me to calculate factorial of stupid negative values. That is the string that should be printed. But if you don't instruct Dumbo to do that, Dumbo will still print 1. This tells you to be how careful you ought to be. You can solve using these if statements or conditional executions things like finding roots of quadratic equation. There will be enough text examples and programming examples. Typically you are given values of three coefficients a, b and c for a quadratic a x square plus b x plus c equal to 0. You would have solved the roots of this equation umpteen times in your life. Right? You calculate a discriminant which is b square minus 4ac under root and then you calculate root 1 as minus sorry discriminant upon 2a or something and then or minus 2a whatever that formula. Everything works well ordinarily except when b square minus 4ac turns out to be negative and you ask Mr. Dumbo to calculate square root of negative. This time since there is no specific instruction, here you are instructing irrespective of the value print and factorial as 1 even if it is negative. But there you are asking him to calculate square and then it goes into some kind of a chapter saying how do I calculate square root of minus 23? It can't. So it will give a error message. What Dumbo will say is I am sorry but you have given me an instruction which I cannot execute. You as programmers must avoid such a situation to come about at all whatever be the values people give to your program as info. That's your responsibility as programmers. So this is the basic decision making. We will stop the decision making at this stage. Okay. We meet another Dumbo. I had actually a demo here. I don't know whether I will be able to show it. Let me just try that very quickly. I should have switched this on. This Dumbo is called turtle Dumbo. Many many years ago a programming language was created called turtle script. You would have heard of logo. Logo actually is a programming environment meant for school children to understand programming. As a matter of fact the concepts that we have studied barring some peculiar squiggles are very straightforward. Particularly the logic with which Dumbo executes instructions can be understood by anybody. Young children may not understand for i equal to count equal to one count less than equal to n etc etc but they can understand repeat something five times. Repeat something ten times. Repeat something four times. We now know how repeat something n times can be implemented using complicated decision making that our C++ Dumbo is capable of. But the turtle Dumbo which can actually execute instructions of this type has also simplified instructions. We say simply repeat five times. Repeat ten times. Repeat four times etc. Let me see if I can get the so this turtle can draw nice pictures which we shall very briefly see. Turtle script is a programming language. There is a handbook of turtle script. It defines all the instructions that turtle can execute which I have given as all these slides will be on the website anyway so you can note down this. And there is some part of your lab using turtle script. But before I switch over to the demo, let us very quickly meet another Dumbo, the real one this time. The real Dumbo is in your lab. You will meet him during your lab slot. Follow the instructions given on the course group page. More specifically labs start from Thursday 30th July 2009. There are explicit instructions for the lab since the class is very large unless everybody abides by the discipline of the breakup of groups and attendance in those groups and batches and so on. It will be impossible to handle the lab situation. The first lab is an introductory lab. There is an assignment for the lab but there won't be any marks deducted if you are not able to complete and submit that assignment properly. The first lab is actually for you to acquaint yourself with the computing environment. Since you are meeting real Dumbo this time, artificial abstract ideas will not work. You will have to type in your name as a roll number as login. You will have to type in your password. I hope all of you are familiar with this. There were a few hands raised in the first lecture when I asked anybody who has not seen a computer. I believe there are about eight to ten such students. They need not worry. There will be teaching assistants who will help you to sort out these issues. But you must of course understand what a keyboard is and what different keys are for. You would have probably seen a typewriter. If not, I would suggest that those students who have never seen a computer might want to look at a computer in their hostel somewhere before coming to the lab. But even if they can't, the lab will take care of that. The lab sessions will be held in the old software lab. This is located in the mathematics department building. All of you are familiar with maths department building next to library. So don't go to the maths department. Walk into the corridor of the ground floor. You will go past a office called CD Percent of our distance engineering education program. The center which incidentally is doing live webcast of these lectures and is also preparing this post-production edited material for later release. So you go past that. There are double glass doors. You enter and press door. You are in old software lab. It is called OSL because now there is a new software lab. But that did not concern you. Most important, your lab group numbers, as I told you is the last digit of your roll number with some exceptions. There are three exceptions. If your last two digits are 41, you will belong not to batch one, but to batch zero. If your last two digits are 42, you will belong not to batch two, but batch eight. And if your last two digits are 51, then you will not belong to batch one or batch zero. You will belong to batch nine. All people with these roll numbers ending in 41, 42 and 51 need to specifically remember their lab slots which are different from the logically assigned batch. Each batch is further divided into four sub-batches which we call groups. Typically in every sub-batch which we call A, B, C, D for convenience, there are about 20 to 22, somewhere between 18 to 22 students. These 18 to 22 students will form a homogeneous group and they will have a single assigned teaching assistant to look after them. That teaching assistant is effectively your teacher for the lab course. So please get to know him well. He or she will solve all your problems. In case there are issues, there will be a senior TA present in the lab and of course I will make occasional forays into the lab as well. First week I propose to attend all the lab for some time. So these are the 40 sub-groups consisting of around 20 to 23 students. The batch timings are 635 to 835 and 840 to 1040 in the evening and night. Now that's the sore point. There's nothing we can do about it. Fortunately the lepers have stopped coming to the campus for some reason. So you need not worry about being eaten by a leper. Even otherwise when the lepers used to come they never touched a human being. They are rumored to have hurt some stray dog or something. So you don't have to worry. Campus is a safe place. But that is how unfortunately the lab timings are safe. Please ensure that you do not have any other activity during your labs. All this is stated on the homepage so you can check. Okay. Now there is a turtle program on the left which you cannot see. Unfortunately on this stupid laptop there is no way to automatically increase the font size. What I will do is I will put these sample turtle strip programs into the lab assignment handout when you go there. But effectively if you execute this it asks your question. How many squares do you want to draw? Suppose I say one it draws one square. The execution is very simple. All of this is automated. You go to this ring like thing and press your mouse. It will execute it. Now suppose I say draw five squares. Basically there is a repeat instruction which will repeat five times or end times that I say end. Then you draw one. It will draw second. It will draw third of course. And by the way on the left hand side you will see a flickering this thing which actually shows which instruction is being executed. You can actually feel what Dumbo is doing. The turtle Dumbo is doing. If you execute this again for let's say larger number. Let's say 10. Notice every time it is repeating there are two repeats. There is an internal repeat to draw a square. And outside is there is a repeat to draw so many squares. But every time a square is drawn the pain or the turtle moves away without drawing anything to some next position at some angle. And that angle itself depends upon how many squares you have asked it to draw. It's an extremely simple programming paradigm. Particularly if you understand input. It can take one value as input. You understand repeat which is something really similar to four count equal to zero something something. And then instead of saying calculate this, calculate that it has instructions like pen down, forward so many points, backward so many points, angle so much, etc. Extremely simple instructions. I think you will enjoy doing that because here you will actually see where your algorithm is working properly or not. So with this we will conclude today's lecture.