Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Activity You'll write Turtle commands to draw a set of triangles of increasingly larger size something like this example. Lab 3 - 987654321 provide a

image text in transcribed
image text in transcribed
Activity You'll write Turtle commands to draw a set of triangles of increasingly larger size something like this example. Lab 3 - 987654321 provide a template with a lot of commands you'll need for future assignments, so read through that code and the comments You'll create variables for the angle and side_length (I started with a length of 10), and code the commands to draw a filled triangle After that triangle, increase your side_length variable using a multiplication expression (1 doubled mine each time) set a new color, and draw the next filled triangle. Repeat so that you have 5 triangles, of different colors. Use the UIC hexadecimal color values found at https://marketing, uic edu/marketing-toolbox/university-style-guide/visual-elements/ 1. Navigate to https://trinkel 1o/librarytrinkets/8eeec06cd6 and make a copy. 2. In the header block, update the assignment name, replace your UIN> (including the brackets) with your UIN, AND replace with the URL to your Trinket. Update the line that writes to the screen with your UIN. 3. Read through the code and comments provided. 4. Set your initial variable values, and write the commands to draw your first filled triangle using those variables (not hard-coded numeric values for side length and angle.) 5. Test, then copy/paste edit to draw the next triangle. Continue until you have 5 triangles 6. Download the zip from Trinket and upload to Gradescope. Linker coue wmowe = trinket Run ? Modules Share 31 32 33 34 main.py + position the turtle and write some text t. penup() t.goto-200,200) t.write("Lab 3 - 658926341", move-False, align="left", font-'Arial, 24, 'normal'?) t.update() 38 = position the turtle so we have room to draw some big triangles t.goto-200,e) 41 + variables for angle and side_length anele - 120 side_length - 10 46 set color and add commands to draw a filled turtle of a specific color + leave the turtle at the appropriate starting place for the next triangle 49 sa 51 52 t.color ) S. pendown() t.begin () t.forward(side_length) t.left(angle) t. forward(side length) t.left(onele) t. forward(side_length) t.end fill() 57 58 t.update() 63 64 set a new color, increase your side length and draw another triangle do this for a total of 5 triangles of increasing size and differing colors GP 68 ,en +111). t. forward(side length-2) 70 71 72 73 t.left(angle) t. forward(side length 2) t.left(angle) t. forwardiside length 2) t.update() t. pendown() 95.begin to t. forward (side length )

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

DATABASE Administrator Make A Difference

Authors: Mohciine Elmourabit

1st Edition

B0CGM7XG75, 978-1722657802

More Books

Students also viewed these Databases questions

Question

Consistently develop management talent.

Answered: 1 week ago

Question

Create a refreshed and common vision and values across Europe.

Answered: 1 week ago

Question

Provide the best employee relations environment.

Answered: 1 week ago