The Circle Track


Start at the train station, make 3 laps on the circle track and return back to the station.

Sample Solution:

This program uses the smart train's distance control. Since this track is a perfect circle, the track's length can be calculated using the π*diameter formula. When the train travels this distance, the lap flag variable is set to 1 and the repeat loop resets the distance to 0. After the 3 laps are complete, the train stops. The sounds and light animations in the program are used to punctuate the train's actions.