Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 11B: Write a function named umbrella that uses turtle graphics and the function triangle in question 11A to draw a sequence of triangles of

image text in transcribed Question 11B: Write a function named umbrella that uses turtle graphics and the function triangle in question 11A to draw a sequence of triangles of specified size, position and orientation. The function umbrella takes 4 parameters: 1. t, a turtle used for drawing 2. side, the length of a side 3. rotation, the angle that each triangle is rotated counterclockwise relative to the previous triangle 4. count, the number of triangles to draw If umbrella is called by the following code, this would be correct output: import turtle snappy = turtle.Turtle() umbrella(snappy, 100, 60, 6)

Question 11A (8 points) Write a function named triangle that uses turtle graphics to draw an equilateral triangle of specified size. An equilateral triangle is a triangle in which all three sides are equal and all three internal angles are also equal and are 60 degrees each The function triangle takes two parameters: 1. 2. t, a turtle that is used for drawing side, the length of a side The function triangle should draw an equilateral triangle at the initial position and orientation of t, and should leave t with the same position and orientation on exit. Turtle t is initially at one of the three points of intersection and is oriented in the direction in which one of the sides should be drawn. Do not make any assumptions about the initial up/down state of the turtle. For full credit you must use a loop for repeated operations. The following is correct sample input and output. import turtle snappy turtle.Turtle() triangle(snappy, 100)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advanced MySQL 8 Discover The Full Potential Of MySQL And Ensure High Performance Of Your Database

Authors: Eric Vanier ,Birju Shah ,Tejaswi Malepati

1st Edition

1788834445, 978-1788834445

Students also viewed these Databases questions

Question

f. What stereotypes were reinforced in the commercials?

Answered: 1 week ago