Answered step by step
Verified Expert Solution
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...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started