Choose all that apply: Is Python a(n)
What are examples of Python functions or syntax that can produce the illustration in the video below?
If you selected "other" above, what other code would you use?
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?
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)
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.
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
What is the best choice for pseudocode for lines 2 - 4 in the code above?
If you can only modify the constant integers in lines 2 - 4 marked in the loop above, which is NOT possible?
What is the best pseudocode to use in line 9 above?
Finish writing the pseudocode for lines 8 to 10 in the code above.
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