Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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
image text in transcribed
image text in transcribed
image text in transcribed
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

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

Automating Access Databases With Macros

Authors: Fish Davis

1st Edition

1797816349, 978-1797816340

More Books

Students also viewed these Databases questions