CLASS 4 COMPUTER CH 05 MORE KTURTLE COMMANDS

the Pentagon by 100 steps then it again turn right by the 72 Degree and drop the fifth line of Pentagon by 100 steps so here we have a pentagon with five sides then it clear the screen and next we have a hexagon having six sides so we use repeat command sixth time with the 100 units of the one side with and the angle at which we have to move is 60 degree so divide 360 by 60 degree we get the angle 60D so here we have draw the first line and then move the turtle to the right side by 60 degree and draw a second line then the turtle move again 60 degree to the right side or clockwise and draw third line of hexagon by 100 units and then again turn right by 60 degree and draw the fourth line of the hexagon by 100 units then it again turn right by 60 degree foreign with seven sides first we will calculate the angle of turtle so we divide 360 by 7 and get the value 51 degrees foreign foreign foreign with seven side one two three four five six seven next we have a octagon with eight sides in octagon by dividing the 360 by 8 we get the angle 45 degree so in a octagon 8 sides are there I don't know thank you so in this way we have a now let's learn about the K turtle to draw a circle a circle can be drawn a full circle in a drawing with 360 degree and semi-circle with 180 degree a circle can be drawn using the repeat command is that repeat 360 . for example if we have to draw a circle so now type reset command and repeat command 360 steps forward one and turn right one degree execute this command click on run button select the speed pool so here we have a circle in your book a table is given it makes the circle in a particular size to reduce the size of circles or increase the number of steps in the forward comma the number of degree in PR comma it will reduce the number of repetition and therefore reduce the size of Center for example if we use to draw a circle with the 10 steps apply means we multiply this 10 by 360 is equal to 360 degree so the number of angles at which you want to draw your third move your turtle to drop a circle so you have to divide that number by 360. click on run button check the output so here we have a title with small size if you want to increase or decrease the size more then you have to decrease the forward steps angle but combining tr14 TR 60 tier 90 degree NTR 120 with the forward command you will get the polygons and PR with 180 TR with 60 degree it gives a straight line so when we divide any angle but with the TR degree so we will get the polygons and also the circle next is repeat inside repeat for example you want to use a repeat under other B okay so you can also use it for example 30 time 36 time repeat repeat foreign 90 degree then TR IED 10 degrees for example here we have repeat 36 time then under the forward we are using repeat again for 4 times 100 they are 90 degree for the scale and TR for 10 degree to repeat inside the repeat so let's check the vertex output click on run button with this you can control the speed to see it so we chose now slow so it execute one by one instruction first it out to repeat one time then it repeats enough so then it turn right by 10 degree then it repeat again okay so it takes a 36 time for the final hour just have a wait okay now we relearn this again at the full speed so click on run button so in this way we have repeat under the repeat to draw this picture move the title the beat you can notice that the turtle can very quickly in the drawing the grid command makes the title to beat for the given period of time for example weight X means waiter for acceptance try the following command for example we have a repeat 36 and forward 10 so in the scene we can use also here the bead command with 0.5 or 5 Seconds the code draw us similar shape this shape but the total weight half a second after each step it makes it seems the turtle is moving slow so just run this command so here we have a complete picture again with the B so you can also control the speed of turtle with the help of wheat copper okay students also complete for the practice time given in your book and also perform the exercise part on your book and do the part of your application area and descriptive type question also on your note thank you

"WEBVTTKind: captionsLanguage: engood morning students today we are going to start with our subject computer of class 4. open your chapter number five more K Turtle commands in your previous class you have learned the basics of K Turtle commands in this chapter we will learn the more advanced commands that we can use in K turtle let us review what you read about the K Title in the previous class and the commands that you already know K turtle is a simple computer language used to draw the figures type text and perform arithmetic calculations just as you can use a pencil to draw and write in your notebook a title uses a pen for drawing it this pen is called turtle so we call this pen as a turtle so let's review about your basic K Turtle commands first is forward command f w 18 so in this command we have give the command to this Turtle to move forward for 18 steps so run this command by clicking on run button from run man so this Turtle move 80 steps to the forward Direction next is BW or backward for example 140. okay so now this Turtle moved 140 steps to the backward okay we will delete the previous command click on run button so it moves 80 steps then 60 step mode to 140. next is TR command is used to turn your turtle to the right side if you want to rotate this Turtle to the right side then we use TR command for example TR 60 degree then we give the command to Turtle to forward 100 steps okay first it rotate the turtle to the right hand side by 60 degree cooking then it moves 100 steps forward so just run this command by clicking on run button okay so this is 100 steps to the right side at 60 degree angle next is TL gamma to rotate your Turtle heads to the anti-clock direction or to the right hand side okay just delete these two commands Okay foreign command is used to reset your data to the original location then we use a forward command for 20 steps then TL for 90 degree okay then forward 20 step okay now just run this command click on run button so first the title move the 20 steps up then its head moved to the left side okay then it move 20 steps in a forward to the left side so in this way you can use the TL command to rotate your title head to the left side and TR for right side then we have learned about the direction command if you want to move your turtle in the clockwise Direction at any DVD then you can use dir command directly for example d i r and okay now just run this command click on run button so the turtle move and to the right side clockwise by 100 degree next is CC and CS CS is used to change the size and width of this canvas okay if you want to change the height and width of this canvas then you can use CS command CC command is used to change the canvas color for example c c okay then we have to give the three colors value for more detail you can check our video on YouTube for class third okay basics of K turtle okay chapter number four okay so you can also check for uh this these commands that we are discussed now in class thirds chapter number third let's learn the K Title and K Turtle commands for more detail so we have to give the three colors value okay so in this way you can check okay and we will also post the link of third class video of chapter third and fourth in the description you can also check in description for that click on run button to run this command so here the change to the black color if you change the value of these three colors okay so then you will find the other colors click on run button to run this comma so in this way we have a different colors value okay so you can change the canvas color then PW is used to pan the size PW command is used to change the pen size okay for example five if we use a forward command for 20 steps now you can see so the pen size is changed to the width is change of pen to the file okay so you can also change the pen color by using p c command similarly you can Define the different color combination okay now just run this command so in this program first CC command is used to change the canvas color PW command is used to the pan with okay or pen signs PC command is used to change the color of pen okay and FW command is used to move your turtle hundred steps in forward Direction then we can use go command okay to move your turtle on any location in this canvas without triangle like for example go 40 comma 40 so in this it start the counting of this direction from here okay about the go command you can watch our video Chapter number five writing and matching catered to clear your basics for more detail you can check that video okay so here we are using the forward command and okay so just run this command first it change the canvas size then let's change the pan size then let's change the pen color then it move the 100 steps from here to here then it go to the location 40 40 okay actually this point is 0 0 from here 40 steps down and 40 steps in this direction here we have 40 40 from here it moves 60 steps up in the forward Direction so here it going out from the canvas okay so always give the command foreign so this is the commands related with the magic you can also learn about these commands in detail in chapter number five of third class you can watch the video on our YouTube channel so here we are using SS command to make it visible and as such command is to hide your character okay so just run this command so after the drawing the turtle files okay if you are using SS comma then it will display then we have learned about the basics of some maths formulas in K turtle in your third class okay so one is the reset to reset to the default position set everything likes as it is when you have started the detector the title is Equalization to the middle of the camera the canvas color is white then I can draw a black line on the canvas and the canvas size is set to 400 into 400 units CCL is after making or drawing anything on a canvas to clear it Center command is used to move to the center position of your canvas without Drawing the Line the hand of the turtle is pointing to the same direction as the previous command then we have learned about the font size font size command is used to change the font for your print command okay like on size is 20. then we are using print command okay print 14. so as you click on run button so now you can see here we have 14 with the font size 20. we can also use some mathematic functions in a K Title like 40 plus 30 so here we just increase the font size to 40. click on one command so here we have a center first hit add 40 plus 30 and then we will get the final result 70. on our output screen so in this way you can use the arithmetic operators in a date result and the basic you have learned in your previous class I again repeat to watch in a detail you can check the link in the description next is next is message and ask command so you have learned about the message and ask command which helps you to display the dialog box with the message and and input request for the user a dialog box is small pop-up window for example a message hello Hello friends just click on the Run button from run menu and you can see here we have a message hello friend similarly you can use ask command is equal to us please enter your code name along with the message box we can use ask command and present at working so here we have ADD the value entered by the user okay the name of school along with this message so just click on a run button from run menu and execute this comma first other window or dialog box will appear which asks you to enter the school name please enter your school link for example enter connection School when you click on OK button just pass the information to the message and you can see the information hello friend Apple international school so in this way you can use a message and ask command in catered now this we have revised the K Turtle command learned in a class third let us take up some more commands first is container containers are used to store a number or text containers that contain the numbers are called variables containers that contain the text are called strings a container name is either a letter or alphabet or a word perceived by the character dollars for example dollar sign X is equal to Pi and then with the help of print command we can print your value so just use a container tag is equal to Pi trained am percent X so in this command a it will change the value of x click on run button and click on run command from run menu so here we have five okay so you can use font size to print a large number font size is equal to 30 rerun this command font size 30 click on run button from run menu so now you can see that we have file if you change the value of x with 10 then it will bring the value 10. okay so 5 is also there so you have need to clear the previous thing with the help of reset comma now click on run button see the working of reset time on here we can check x value is 10 and its type is number similarly in the first line the letter X is the number container it contains the value 5 in the second line it means in this line the value will be printed on the canvas notice that if you have print dollars online on the canvas the command is this let's take an example by solving the math sum using some variables so let's check for example X is equal to 10 Y is equal to 20 then C is equal to a 10 percent a plus some person sorry y we are using X Y but in your book is using ABS so here you can write the Z equal to X Plus y then we change the pan size and then print along with this you can use result Plus so X Plus so we are using the plus operator to combine a string Plus facility okay so after writing this code just so we will increase the font size to 14 please hear it Okay now click on run button click on run so from here you can slow down the speed of your title so you can see it step by step so first X is equal to 10 you can check in this inspector pane X is equal to tan Y is equal to 20 these two are number then Z is equal to 13 by adding these two value 10 plus 20 is equal to 30 then it's going on print command so here we have result okay so that output is not okay so we have used the go command okay so here x is equal to 10 Y is equal to 20. these two are the numbers Z is equal to 30 and then it's at the print command Center result is equal to x x is equal to 10 plus 20 is equal to z z is equal to 2 so in this way you can use a container tag to get the value from the user and also use it in your message boxes then turn up and bend down similarly if you want to use a value from the user you can use here the word ask these enter the number similarly you can use this ask command for y second number please enter number two here we will add number one okay now just run this command click on run button click on run first it reset then it moved to 2020 position of the cameras then it asks please enter the number so here we have our pop-up so this is the dialog box please enter number one so I'll just enter 12 then I'll click on OK button it assign the value X is equal to value then it is for y please enter number two for example I just enter 16 okay now here Y is black when I click on OK button so this value 16 is assigned to variable y so Y is equal to 16 it's also type of a number then let's perform the fifth instruction Z is equal to X Plus Y and we got the value of Z is equal to 28 then in the six size if change the fonts size to the 20 in the seventh instruction here we have print command result 12 means x x is equal to 12 Y is equal to 16 and Z is equal to 28 okay students in this way you can also create your own calculator in K turtle with perform all the arithmetic operator according to your requirement okay so the value is taken from the user and that value is assigned to a variable okay and then it performs addition subtraction or multiplication as you want okay next is append up and pan down do you know the how the title draw the lines when you give it command the turtle has the pen which enable it to draw while moving but the title can also move around without drawing a line pen up p u is a command used to move the turtle to any part of the screen without drawing a line it is useful when you want to leave a gap or gaps in the drawing but what should you do if you want the turtle to draw again then you have to use pen down or PV command it is used to continue the drawing which helps you to understand the pen up and Panda command so let's learn for example we are typing some code okay first of all we will delete these commands here we have forward 20 then pan up then forward 30 enter then pen down then forward ing okay so we are going to execute this command run this command with the help of run menu so now the turtle is here it moves 20 steps of then Panda then it moves 30 steps then pen down and it moves 40 steps so here the turtle moves but no line is drawn so here we use pen up but when we down the pen so it's draw the line again so similarly whenever you are doing the drawing on your notebook so sometime you depend down or sometime you pen up okay so the same method is used in the theater next is command is repeat if you want the execute a set of commands shown in a data pane you get a sequence but did you notice that in this example there are two commands that have been repeated four times okay to avoid such a repetition the K Turtle provides us the repeat comma so here for example we are using some commands in K Turtle like to draw a scale so first we have to use forward 100 steps then we have to turn right at 90 degree then we have to move for it 100 steps then we have to use turn right at 90 degree then we have forward 100 steps then we have to turn right at 90 degree then we have to move further 100 steps more okay so in this way we have to use these commands to draw a scale just run this command and watch it but this at the reset position then forward 100 steps then turn right at 90 degree under steps forward then turn right at 90 degree then it's 100 steps go then it's again turn right and move under steps forward so in this way we repeat these two instructions again and forward 100 steps turn right forward 100 steps turn right forward 100 steps turn right fourth time similarly you can use the repeat command okay so how we will use a repeat command if we have to use these commands to repeat forward 100 steps 30 degree 100 steps and then be closing we are using the curly brackets now we mentioned how many times you want to repeat this then clean these all the rest of the things for forward 100 steps then turn right and fourth time so just click on run button so it's set to repeat first time under steps 90 degree so with the help of repeat Karma you can repeat for more than one command again and dirty and numbers of time so using the repeat command the command is drawn to scare therefore it becomes this okay next is drawing a polygon and circle one of the easiest thing is to do the K turtle is to draw the different shapes of polygon a polygon is a flat closed shape with at least three sides and three angles usually it has a 5 watt more notice in that order to draw the closed polygon the title has to walk around the edges eventually turning through 360 degree before coming to the center position since the turtle makes and turns an n-sided polygon the angles of each turn 360 divided by n so first we will learn the to draw a triangle using a repeat command for example in a triangle we have two three sides so we divide 360 degree with the 3 so we have a turn right angle at 90 120 degree so here we have about 20 degree so forward steps if you want to increase the length of your triangle you can use here the move value for example 140. click on run button from run menu then it execute the repeat command sorry it will be now so in a triangle we have a three size so we repeat this command with the three types first side then 120 degree then 120 degree and here it goes to the final position so always we turn our turtle with that degree so first we have to calculate the angle the number of sides of your polygon so divide the 360 by sides of polygon and then we will get the exact number of degree for our turtle next is if you want to use a skill similarly we have to use a 4 here 90 degree okay so we are using some more commands within a one go so first it created square at 10 10 then I'll use go to foreign types of polygon first is to scale so the four sides of scale forward 100 steps then 90 degree is a run four times to draw a scale so the turtle speed is at lowest so it takes some time to execute each instruction one by part so the return moved to find a square is the fourth side repeat for all the time to find the scale then it moved to the 90 degree then CCL command is to clear the previous screen to the previous canvas that we have done draw anything new then in a next chain section we have a draw a pentagon having on five sides each size with the fifth 100 steps so the one side of pentagon then the turtle moved to the 72 Degree right then draw the second line of pentagon by 100 steps or the width is under c unit then turn right at 72 degrees and Define third side of the Pentagon by 100 steps then it again routine right side 2D and Define four side of the Pentagon by 100 steps then it again turn right by the 72 Degree and drop the fifth line of Pentagon by 100 steps so here we have a pentagon with five sides then it clear the screen and next we have a hexagon having six sides so we use repeat command sixth time with the 100 units of the one side with and the angle at which we have to move is 60 degree so divide 360 by 60 degree we get the angle 60D so here we have draw the first line and then move the turtle to the right side by 60 degree and draw a second line then the turtle move again 60 degree to the right side or clockwise and draw third line of hexagon by 100 units and then again turn right by 60 degree and draw the fourth line of the hexagon by 100 units then it again turn right by 60 degree foreign with seven sides first we will calculate the angle of turtle so we divide 360 by 7 and get the value 51 degrees foreign foreign foreign with seven side one two three four five six seven next we have a octagon with eight sides in octagon by dividing the 360 by 8 we get the angle 45 degree so in a octagon 8 sides are there I don't know thank you so in this way we have a now let's learn about the K turtle to draw a circle a circle can be drawn a full circle in a drawing with 360 degree and semi-circle with 180 degree a circle can be drawn using the repeat command is that repeat 360 . for example if we have to draw a circle so now type reset command and repeat command 360 steps forward one and turn right one degree execute this command click on run button select the speed pool so here we have a circle in your book a table is given it makes the circle in a particular size to reduce the size of circles or increase the number of steps in the forward comma the number of degree in PR comma it will reduce the number of repetition and therefore reduce the size of Center for example if we use to draw a circle with the 10 steps apply means we multiply this 10 by 360 is equal to 360 degree so the number of angles at which you want to draw your third move your turtle to drop a circle so you have to divide that number by 360. click on run button check the output so here we have a title with small size if you want to increase or decrease the size more then you have to decrease the forward steps angle but combining tr14 TR 60 tier 90 degree NTR 120 with the forward command you will get the polygons and PR with 180 TR with 60 degree it gives a straight line so when we divide any angle but with the TR degree so we will get the polygons and also the circle next is repeat inside repeat for example you want to use a repeat under other B okay so you can also use it for example 30 time 36 time repeat repeat foreign 90 degree then TR IED 10 degrees for example here we have repeat 36 time then under the forward we are using repeat again for 4 times 100 they are 90 degree for the scale and TR for 10 degree to repeat inside the repeat so let's check the vertex output click on run button with this you can control the speed to see it so we chose now slow so it execute one by one instruction first it out to repeat one time then it repeats enough so then it turn right by 10 degree then it repeat again okay so it takes a 36 time for the final hour just have a wait okay now we relearn this again at the full speed so click on run button so in this way we have repeat under the repeat to draw this picture move the title the beat you can notice that the turtle can very quickly in the drawing the grid command makes the title to beat for the given period of time for example weight X means waiter for acceptance try the following command for example we have a repeat 36 and forward 10 so in the scene we can use also here the bead command with 0.5 or 5 Seconds the code draw us similar shape this shape but the total weight half a second after each step it makes it seems the turtle is moving slow so just run this command so here we have a complete picture again with the B so you can also control the speed of turtle with the help of wheat copper okay students also complete for the practice time given in your book and also perform the exercise part on your book and do the part of your application area and descriptive type question also on your note thank you have a nice daygood morning students today we are going to start with our subject computer of class 4. open your chapter number five more K Turtle commands in your previous class you have learned the basics of K Turtle commands in this chapter we will learn the more advanced commands that we can use in K turtle let us review what you read about the K Title in the previous class and the commands that you already know K turtle is a simple computer language used to draw the figures type text and perform arithmetic calculations just as you can use a pencil to draw and write in your notebook a title uses a pen for drawing it this pen is called turtle so we call this pen as a turtle so let's review about your basic K Turtle commands first is forward command f w 18 so in this command we have give the command to this Turtle to move forward for 18 steps so run this command by clicking on run button from run man so this Turtle move 80 steps to the forward Direction next is BW or backward for example 140. okay so now this Turtle moved 140 steps to the backward okay we will delete the previous command click on run button so it moves 80 steps then 60 step mode to 140. next is TR command is used to turn your turtle to the right side if you want to rotate this Turtle to the right side then we use TR command for example TR 60 degree then we give the command to Turtle to forward 100 steps okay first it rotate the turtle to the right hand side by 60 degree cooking then it moves 100 steps forward so just run this command by clicking on run button okay so this is 100 steps to the right side at 60 degree angle next is TL gamma to rotate your Turtle heads to the anti-clock direction or to the right hand side okay just delete these two commands Okay foreign command is used to reset your data to the original location then we use a forward command for 20 steps then TL for 90 degree okay then forward 20 step okay now just run this command click on run button so first the title move the 20 steps up then its head moved to the left side okay then it move 20 steps in a forward to the left side so in this way you can use the TL command to rotate your title head to the left side and TR for right side then we have learned about the direction command if you want to move your turtle in the clockwise Direction at any DVD then you can use dir command directly for example d i r and okay now just run this command click on run button so the turtle move and to the right side clockwise by 100 degree next is CC and CS CS is used to change the size and width of this canvas okay if you want to change the height and width of this canvas then you can use CS command CC command is used to change the canvas color for example c c okay then we have to give the three colors value for more detail you can check our video on YouTube for class third okay basics of K turtle okay chapter number four okay so you can also check for uh this these commands that we are discussed now in class thirds chapter number third let's learn the K Title and K Turtle commands for more detail so we have to give the three colors value okay so in this way you can check okay and we will also post the link of third class video of chapter third and fourth in the description you can also check in description for that click on run button to run this command so here the change to the black color if you change the value of these three colors okay so then you will find the other colors click on run button to run this comma so in this way we have a different colors value okay so you can change the canvas color then PW is used to pan the size PW command is used to change the pen size okay for example five if we use a forward command for 20 steps now you can see so the pen size is changed to the width is change of pen to the file okay so you can also change the pen color by using p c command similarly you can Define the different color combination okay now just run this command so in this program first CC command is used to change the canvas color PW command is used to the pan with okay or pen signs PC command is used to change the color of pen okay and FW command is used to move your turtle hundred steps in forward Direction then we can use go command okay to move your turtle on any location in this canvas without triangle like for example go 40 comma 40 so in this it start the counting of this direction from here okay about the go command you can watch our video Chapter number five writing and matching catered to clear your basics for more detail you can check that video okay so here we are using the forward command and okay so just run this command first it change the canvas size then let's change the pan size then let's change the pen color then it move the 100 steps from here to here then it go to the location 40 40 okay actually this point is 0 0 from here 40 steps down and 40 steps in this direction here we have 40 40 from here it moves 60 steps up in the forward Direction so here it going out from the canvas okay so always give the command foreign so this is the commands related with the magic you can also learn about these commands in detail in chapter number five of third class you can watch the video on our YouTube channel so here we are using SS command to make it visible and as such command is to hide your character okay so just run this command so after the drawing the turtle files okay if you are using SS comma then it will display then we have learned about the basics of some maths formulas in K turtle in your third class okay so one is the reset to reset to the default position set everything likes as it is when you have started the detector the title is Equalization to the middle of the camera the canvas color is white then I can draw a black line on the canvas and the canvas size is set to 400 into 400 units CCL is after making or drawing anything on a canvas to clear it Center command is used to move to the center position of your canvas without Drawing the Line the hand of the turtle is pointing to the same direction as the previous command then we have learned about the font size font size command is used to change the font for your print command okay like on size is 20. then we are using print command okay print 14. so as you click on run button so now you can see here we have 14 with the font size 20. we can also use some mathematic functions in a K Title like 40 plus 30 so here we just increase the font size to 40. click on one command so here we have a center first hit add 40 plus 30 and then we will get the final result 70. on our output screen so in this way you can use the arithmetic operators in a date result and the basic you have learned in your previous class I again repeat to watch in a detail you can check the link in the description next is next is message and ask command so you have learned about the message and ask command which helps you to display the dialog box with the message and and input request for the user a dialog box is small pop-up window for example a message hello Hello friends just click on the Run button from run menu and you can see here we have a message hello friend similarly you can use ask command is equal to us please enter your code name along with the message box we can use ask command and present at working so here we have ADD the value entered by the user okay the name of school along with this message so just click on a run button from run menu and execute this comma first other window or dialog box will appear which asks you to enter the school name please enter your school link for example enter connection School when you click on OK button just pass the information to the message and you can see the information hello friend Apple international school so in this way you can use a message and ask command in catered now this we have revised the K Turtle command learned in a class third let us take up some more commands first is container containers are used to store a number or text containers that contain the numbers are called variables containers that contain the text are called strings a container name is either a letter or alphabet or a word perceived by the character dollars for example dollar sign X is equal to Pi and then with the help of print command we can print your value so just use a container tag is equal to Pi trained am percent X so in this command a it will change the value of x click on run button and click on run command from run menu so here we have five okay so you can use font size to print a large number font size is equal to 30 rerun this command font size 30 click on run button from run menu so now you can see that we have file if you change the value of x with 10 then it will bring the value 10. okay so 5 is also there so you have need to clear the previous thing with the help of reset comma now click on run button see the working of reset time on here we can check x value is 10 and its type is number similarly in the first line the letter X is the number container it contains the value 5 in the second line it means in this line the value will be printed on the canvas notice that if you have print dollars online on the canvas the command is this let's take an example by solving the math sum using some variables so let's check for example X is equal to 10 Y is equal to 20 then C is equal to a 10 percent a plus some person sorry y we are using X Y but in your book is using ABS so here you can write the Z equal to X Plus y then we change the pan size and then print along with this you can use result Plus so X Plus so we are using the plus operator to combine a string Plus facility okay so after writing this code just so we will increase the font size to 14 please hear it Okay now click on run button click on run so from here you can slow down the speed of your title so you can see it step by step so first X is equal to 10 you can check in this inspector pane X is equal to tan Y is equal to 20 these two are number then Z is equal to 13 by adding these two value 10 plus 20 is equal to 30 then it's going on print command so here we have result okay so that output is not okay so we have used the go command okay so here x is equal to 10 Y is equal to 20. these two are the numbers Z is equal to 30 and then it's at the print command Center result is equal to x x is equal to 10 plus 20 is equal to z z is equal to 2 so in this way you can use a container tag to get the value from the user and also use it in your message boxes then turn up and bend down similarly if you want to use a value from the user you can use here the word ask these enter the number similarly you can use this ask command for y second number please enter number two here we will add number one okay now just run this command click on run button click on run first it reset then it moved to 2020 position of the cameras then it asks please enter the number so here we have our pop-up so this is the dialog box please enter number one so I'll just enter 12 then I'll click on OK button it assign the value X is equal to value then it is for y please enter number two for example I just enter 16 okay now here Y is black when I click on OK button so this value 16 is assigned to variable y so Y is equal to 16 it's also type of a number then let's perform the fifth instruction Z is equal to X Plus Y and we got the value of Z is equal to 28 then in the six size if change the fonts size to the 20 in the seventh instruction here we have print command result 12 means x x is equal to 12 Y is equal to 16 and Z is equal to 28 okay students in this way you can also create your own calculator in K turtle with perform all the arithmetic operator according to your requirement okay so the value is taken from the user and that value is assigned to a variable okay and then it performs addition subtraction or multiplication as you want okay next is append up and pan down do you know the how the title draw the lines when you give it command the turtle has the pen which enable it to draw while moving but the title can also move around without drawing a line pen up p u is a command used to move the turtle to any part of the screen without drawing a line it is useful when you want to leave a gap or gaps in the drawing but what should you do if you want the turtle to draw again then you have to use pen down or PV command it is used to continue the drawing which helps you to understand the pen up and Panda command so let's learn for example we are typing some code okay first of all we will delete these commands here we have forward 20 then pan up then forward 30 enter then pen down then forward ing okay so we are going to execute this command run this command with the help of run menu so now the turtle is here it moves 20 steps of then Panda then it moves 30 steps then pen down and it moves 40 steps so here the turtle moves but no line is drawn so here we use pen up but when we down the pen so it's draw the line again so similarly whenever you are doing the drawing on your notebook so sometime you depend down or sometime you pen up okay so the same method is used in the theater next is command is repeat if you want the execute a set of commands shown in a data pane you get a sequence but did you notice that in this example there are two commands that have been repeated four times okay to avoid such a repetition the K Turtle provides us the repeat comma so here for example we are using some commands in K Turtle like to draw a scale so first we have to use forward 100 steps then we have to turn right at 90 degree then we have to move for it 100 steps then we have to use turn right at 90 degree then we have forward 100 steps then we have to turn right at 90 degree then we have to move further 100 steps more okay so in this way we have to use these commands to draw a scale just run this command and watch it but this at the reset position then forward 100 steps then turn right at 90 degree under steps forward then turn right at 90 degree then it's 100 steps go then it's again turn right and move under steps forward so in this way we repeat these two instructions again and forward 100 steps turn right forward 100 steps turn right forward 100 steps turn right fourth time similarly you can use the repeat command okay so how we will use a repeat command if we have to use these commands to repeat forward 100 steps 30 degree 100 steps and then be closing we are using the curly brackets now we mentioned how many times you want to repeat this then clean these all the rest of the things for forward 100 steps then turn right and fourth time so just click on run button so it's set to repeat first time under steps 90 degree so with the help of repeat Karma you can repeat for more than one command again and dirty and numbers of time so using the repeat command the command is drawn to scare therefore it becomes this okay next is drawing a polygon and circle one of the easiest thing is to do the K turtle is to draw the different shapes of polygon a polygon is a flat closed shape with at least three sides and three angles usually it has a 5 watt more notice in that order to draw the closed polygon the title has to walk around the edges eventually turning through 360 degree before coming to the center position since the turtle makes and turns an n-sided polygon the angles of each turn 360 divided by n so first we will learn the to draw a triangle using a repeat command for example in a triangle we have two three sides so we divide 360 degree with the 3 so we have a turn right angle at 90 120 degree so here we have about 20 degree so forward steps if you want to increase the length of your triangle you can use here the move value for example 140. click on run button from run menu then it execute the repeat command sorry it will be now so in a triangle we have a three size so we repeat this command with the three types first side then 120 degree then 120 degree and here it goes to the final position so always we turn our turtle with that degree so first we have to calculate the angle the number of sides of your polygon so divide the 360 by sides of polygon and then we will get the exact number of degree for our turtle next is if you want to use a skill similarly we have to use a 4 here 90 degree okay so we are using some more commands within a one go so first it created square at 10 10 then I'll use go to foreign types of polygon first is to scale so the four sides of scale forward 100 steps then 90 degree is a run four times to draw a scale so the turtle speed is at lowest so it takes some time to execute each instruction one by part so the return moved to find a square is the fourth side repeat for all the time to find the scale then it moved to the 90 degree then CCL command is to clear the previous screen to the previous canvas that we have done draw anything new then in a next chain section we have a draw a pentagon having on five sides each size with the fifth 100 steps so the one side of pentagon then the turtle moved to the 72 Degree right then draw the second line of pentagon by 100 steps or the width is under c unit then turn right at 72 degrees and Define third side of the Pentagon by 100 steps then it again routine right side 2D and Define four side of the Pentagon by 100 steps then it again turn right by the 72 Degree and drop the fifth line of Pentagon by 100 steps so here we have a pentagon with five sides then it clear the screen and next we have a hexagon having six sides so we use repeat command sixth time with the 100 units of the one side with and the angle at which we have to move is 60 degree so divide 360 by 60 degree we get the angle 60D so here we have draw the first line and then move the turtle to the right side by 60 degree and draw a second line then the turtle move again 60 degree to the right side or clockwise and draw third line of hexagon by 100 units and then again turn right by 60 degree and draw the fourth line of the hexagon by 100 units then it again turn right by 60 degree foreign with seven sides first we will calculate the angle of turtle so we divide 360 by 7 and get the value 51 degrees foreign foreign foreign with seven side one two three four five six seven next we have a octagon with eight sides in octagon by dividing the 360 by 8 we get the angle 45 degree so in a octagon 8 sides are there I don't know thank you so in this way we have a now let's learn about the K turtle to draw a circle a circle can be drawn a full circle in a drawing with 360 degree and semi-circle with 180 degree a circle can be drawn using the repeat command is that repeat 360 . for example if we have to draw a circle so now type reset command and repeat command 360 steps forward one and turn right one degree execute this command click on run button select the speed pool so here we have a circle in your book a table is given it makes the circle in a particular size to reduce the size of circles or increase the number of steps in the forward comma the number of degree in PR comma it will reduce the number of repetition and therefore reduce the size of Center for example if we use to draw a circle with the 10 steps apply means we multiply this 10 by 360 is equal to 360 degree so the number of angles at which you want to draw your third move your turtle to drop a circle so you have to divide that number by 360. click on run button check the output so here we have a title with small size if you want to increase or decrease the size more then you have to decrease the forward steps angle but combining tr14 TR 60 tier 90 degree NTR 120 with the forward command you will get the polygons and PR with 180 TR with 60 degree it gives a straight line so when we divide any angle but with the TR degree so we will get the polygons and also the circle next is repeat inside repeat for example you want to use a repeat under other B okay so you can also use it for example 30 time 36 time repeat repeat foreign 90 degree then TR IED 10 degrees for example here we have repeat 36 time then under the forward we are using repeat again for 4 times 100 they are 90 degree for the scale and TR for 10 degree to repeat inside the repeat so let's check the vertex output click on run button with this you can control the speed to see it so we chose now slow so it execute one by one instruction first it out to repeat one time then it repeats enough so then it turn right by 10 degree then it repeat again okay so it takes a 36 time for the final hour just have a wait okay now we relearn this again at the full speed so click on run button so in this way we have repeat under the repeat to draw this picture move the title the beat you can notice that the turtle can very quickly in the drawing the grid command makes the title to beat for the given period of time for example weight X means waiter for acceptance try the following command for example we have a repeat 36 and forward 10 so in the scene we can use also here the bead command with 0.5 or 5 Seconds the code draw us similar shape this shape but the total weight half a second after each step it makes it seems the turtle is moving slow so just run this command so here we have a complete picture again with the B so you can also control the speed of turtle with the help of wheat copper okay students also complete for the practice time given in your book and also perform the exercise part on your book and do the part of your application area and descriptive type question also on your note thank you have a nice day\n"