Log in
Sign up for FREE
arrow_back
Library

Mr. Kao's Lesson

star
star
star
star
star
Last updated almost 6 years ago
12 questions
1
1
1
1
1
1
1
1
1
1
1
1
SWBAT: Write psuedocode for and then modfiy existing code to meet the required graphics output using the Python turtle module.
Question 1
1.

Choose all that apply: Is Python a(n)

Question 2
2.

What are examples of Python functions or syntax that can produce the illustration in the video below?

Question 3
3.

If you selected "other" above, what other code would you use?

Question 4
4.

Run the code below using the "play" button. What does the line: "turtle.right(90)" do to make the graphics drawing program draw a square?

Question 5
5.

If the turtle.right() orients the turtle object by rotating it some number of degrees, then modify the code above to make the program draw a triangle. What number of degrees do you need to specify for the turtle.right() function? (hint: it has to do with the measure of the external angle of a triangle)

Question 6
6.

Modify the code again to draw a pentagon and a hexagon and paste the code for both in the space below. Refer to the table above if you need help.

Question 7
7.

Answer both questions in the space below:
How do you work out the angle if you know the number of sides?

Complete the equation below (which should calculate angle in terms of sides):
angle = ______ รท sides

Question 8
8.

What is the best choice for pseudocode for lines 2 - 4 in the code above?

Question 9
9.

If you can only modify the constant integers in lines 2 - 4 marked in the loop above, which is NOT possible?

Question 10
10.

What is the best pseudocode to use in line 9 above?

Question 11
11.

Finish writing the pseudocode for lines 8 to 10 in the code above.

Question 12
12.

Modify the code above to create the shape shown. This can be done with only a few lines of code.

Try playing with these Trinkets to experiment with more code using Turtle!
https://trinket.io/library/trinkets/bcc17929f5
https://hourofpython.trinket.io/a-visual-introduction-to-python#/welcome/an-hour-of-code