00:01
In this question, let us look at the changes that we have to do in the code.
00:06
So, the modified code has to have the background color of the canvas to yellow.
00:15
So, the modifications that we have to do are such.
00:25
First, set the background to yellow color.
00:45
Then, we have to create a turtle named frogger.
01:05
Then, set its shape to a custom shape pattern.
01:09
Now, in this case, it is given as a square.
01:18
Then, next that we have to do is, we have to increase its size on every iteration and move forward.
01:40
Then, we have to display a name on the canvas using write method.
02:00
So, now the code will run for one minute with each iteration will last for two seconds and it will make these changes.
02:11
So, let us see how we will do these modifications in python.
02:16
So, i am using a basic compiler here.
02:19
So, the first thing we will do is, we will import the turtle module which will allow us to create and control the turtle graphics.
02:31
So, here i did that.
02:34
Now, we create a screen object named screen.
02:41
So, we have to turn the background color to yellow, right? so, we will create a screen object named screen using the turtle .screen method.
02:52
And this represents the canvas on which the turtle will draw.
02:58
So, it has to be, we have to set the background color of the canvas as yellow using the screen .backgroundcolor as yellow.
03:07
So, the next thing we do is, we create a turtle object named frogger.
03:14
So, let us see how we will do that.
03:16
So, as you can see here, this is the frogger.
03:25
As you can see, this is the turtle object that we have created named frogger using the turtle .turtle function.
03:38
So, this turtle will be used to draw the footprint.
03:42
Now, we set the shape of the turtle using the frogger .shape and we, this will give the turtle the shape of the turtle that is there.
03:53
Then next step we use is frogger .color that is written here which will give the color to the frogger.
04:04
Then next we will give is the frogger .shape .size.
04:09
So, in this case, we increase the size of the turtle using the frogger .shape .size too.
04:18
The shape size, here you can see method takes the argument, the stretch width, the stretch length and the outline width.
04:27
In this case, we are doubling both the width and the length of the turtle.
04:33
Now, we will set a customized pattern.
04:35
As you can see, i can, i'll write here what it is.
04:43
It is a customized pattern.
04:45
So, we have to set a shape pattern for the turtle using the pattern is equal to square method.
04:53
So, we can replace the square with any other shape pattern available in the turtle module...