Python 4.9 : Exercise : Several squares

We will continue our learning with another exercise here we will display several squares of different sizes and we will make a function at this level square with s parenthesis it will take the size of the square initial size with the number of square noted n and here we will have to calculate the size of the square according to the initial size I explain, you will have to make size equal to initial size to i so for me multiply by initial size and here as at the level of range 0 to 4 we see that i starts at and no square starts with zero so we will put i plus one here or we can change the value at the range level we put instead a at this level and then call the square function in our square function with s. So I'll let you do the exercise and we'll meet in a few minutes for the correction concerning the correction of our exercise we are going to make here, inside the function a loop for i range between parenthesis from 0 to n two points size is going to be equal i plus 1 times initial size and then we will call the square function without s and inside we will put the size we will comment this and we will call the square function with s squares and the number of squares we want is 5 you see that it draws well it draws 5 squares and we can have fun multiplying here to make i plus 1 squared there you see that it multiplies really that was all for this video and we say to ourselves very soon for a next section concerning the magic numbers.