- Go to the following directory path:
ch05
> exercises
- If not already present, create a new file:
drawing.py
- Complete the following activity in
drawing.py
- After completing the activity below:
- Make a commit (with any message you want)
- Push your changes back to GitHub.
Write a function
draw_eq_shape
- takes a turtle object, num_sides, and side_length as parameters. The function should use the turtle object to draw a shape according to the parameters.
After you define your function, add code that:
- creates a turtle
- changes the turtle object’s shape to ‘turtle’ and color to green
- Ask a user for num_sides and side_length values
- make sure you cast as the correct type
- call
draw_eq_shape
and pass your turtle, num_sides, and side_length as arguments