Question: Python 1. (20 pts) Write a boolean function, isinRect(t,xR,yR,W,H), which returns True if turtle t is inside a rectangle with center xR,yR and with width

Python
 Python 1. (20 pts) Write a boolean function, isinRect(t,xR,yR,W,H), which returns
True if turtle t is inside a rectangle with center xR,yR and
with width W and height H & which otherwise returns False. [turtle

1. (20 pts) Write a boolean function, isinRect(t,xR,yR,W,H), which returns True if turtle t is inside a rectangle with center xR,yR and with width W and height H & which otherwise returns False. [turtle t can find out where she is using x,y t.pos()) 2. (20 pts) Write a boolean function, isinCircle(t.xC,yC,R), which returns True if turtle t is inside a circle with center xC,yC and with radius R & which otherwise returns False. 3. (20 pts) Write a function isinRectButNotinCircle(t,xR,yRW,H,xC,yC,R),which returns True if turtle t is in the rectangle with center xR,yR and width W and height H but is not in the circle with center xC,yC and with radius R, and which otherwise returns False. Uses functions from Q1 & Q2 as helper functions. 5. Use your function from Q4 to run the following scenarios. In each case, (1) Show the input parameters you used, (2) show the turtle screen output & (3) state what you expect the turtle to do & compare your prediction of turtle motion with what actually happens-does the turtle move at al & where does it end up? Submit label each case Q5A, Q5B, Q5C, QSD a Powerpoint file which shows this information for each case and A (15 pts, xc) Starting point xo,yo is in rectangle but not in circle. Circle is inside larger rectangle. starting point B. (15 pts)Starting point xO,yO is outside both rectangle and circle. Rectangle & circle do not overlap. starting point

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!