Question: by python 5. Implement a class Moth that models a moth flying randomly in straight lines. The moth has a position and can either move

by python
5. Implement a class Moth that models a moth flying randomly in straight lines. The moth has a position and can either move or move towards a light source. When the moth move towards the light source it moves twice as fast. If the moth touches the light source, it dies. To accomplish this, define a class LightSource with small radius around the light source that if the moth enters it dies. (Continues on next page)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
