Question: Write Python code to define a function myDist() that takes two parameters x and y and calculates the distance the point (x, y) and the

Write Python code to define a function myDist() that takes two parameters x and y and calculates the distance the point (x, y) and the origin (0,0). Use the Euclidean distance formula to calculate the distance.

Next write a function isIn() which returns nothing but prints whether or not or not the point (x, y) is inside a circle of radius r.

isIn() should take in three parameters: x, y and r. It should call myDist()..

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!