Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

e. Create a function that will allow your robot to draw something that approximates an equilateral triangle when in pen down mode. Your function

e. Create a function that will allow your robot to draw something that approximates an equilateral triangle when in pen down mode. Your function should accept at least one parameter to define the edge length of the triangle. Write a program that makes use of your function to draw a triangle, drive forwards away from the triangle, and then draw a second triangle with a side length half that of the first triangle. Finally, the robot should drive clear of the second triangle. Figure 1 shows an example of the sort of output we would expect to see. Figure 1 Example of desired output for part (e) Run your code using the following simulator setup magic: %%sim_magic_preloaded -- autorun - Cp -b Empty_Map -x 100 -y 700 -a -90 Your answer should include your code and a screenshot of the simulator after running the code. (8 marks)

Step by Step Solution

3.42 Rating (165 Votes )

There are 3 Steps involved in it

Step: 1

The Python code for the function and the program to draw the triangles im... 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

Principles Of Information Security

Authors: Michael E. Whitman, Herbert J. Mattord

7th Edition

035750643X, 978-0357506431

More Books

Students also viewed these Programming questions

Question

Describe how to distinguish needs from wants.

Answered: 1 week ago

Question

8. What kinds of people are most likely to develop sleep apnea?

Answered: 1 week ago