callable: something that can be called with params; like a function, method, procedure, macro...Point:: 2d tuple/list/array or object/struct with coordinates (x, y) as attributes/fieldsRegion: a callable that receive a point and returntrueif is inside of a a region, andfalseif is out.Distance: a float
- We have a two tanks (in a two positions), and we want to know if we can shot to another positions without danger.
- The tanks have a secure region defined by a circle
- The tanks have a maximun shot distance.
-
Implement a callable named
circlethat receive a float that represent the radius and return aRegionof a circle centered on the origin of coordinates with this radius. -
Implement operations
shift,difference,circle, anddifferenceforRegions. -
Implement a callable named
targetbased on the above operations that return theRegionwich is the response of the problem. -
targetwill receive 3 params:Distancemax_distance: max range of shot.Distancemin_distance: radius of secure region.Positionfriend: coordinates of the friend's tank.