You will decode waggle dances and work out the dance that a forager would give for a known patch of flowers.
The idea. The food lies at the bearing of the Sun plus the clockwise angle of the waggle run, less if the sum is larger. The distance is the time of the waggle run times the colony's scale. To find the dance for known flowers, take the bearing of the Sun away from the bearing of the flowers.
Your tasks.
food_bearing. It gives the bearing of the food from the Sun's bearing and the dance angle.food_distance. It gives the distance in metres from the time of the waggle run and the scale in metres per second.dance_angle. It gives the clockwise angle from straight up, from 0 to 359, for flowers at a known bearing.Run your code once to unlock the worked solution.
Have you tried it?
Do the tasks in the editor first, and run the checker after each one. Its hints help when a check fails. When you are ready, compare your code with this solution.
Log in to join the discussion.
Loading…