Tracy wants a beaded bracelet for her birthday. Write a program that will draw one for her!

The bracelet should follow these specifications:


There must be 36 beads

Each bead should have a radius of 10 pixels

The bracelet must have a diameter of 200

Tracy should draw the bracelet counterclockwise

Hints:


You will need to use a function and a loop in your code!

You will need to turn Tracy 10 degrees after drawing each bead

You should return to the middle of the bracelet circle between drawing each bead

Respuesta :

The program is an illustration of loops and functions

What are functions?

Functions are named program statements that are executed when called or evoked

What are loops?

Loops are program statements that are used to perform repetition operations

The main program

The program written in Python, where comments are used to explain the lines is as follows:

#This sets the speed of the turtle to 0

speed(0)

#This function draws the bead

def draw_bead():

   penup()

   forward(100)

   pendown()

   circle(10)

   penup()

   backward(100)

#This loop is repeated 36 times

for i in range(36):

   draw_bead()

   left(10)


Read more about loops and functions at:

https://brainly.com/question/14284157

ACCESS MORE
EDU ACCESS
Universidad de Mexico