1. On a hot day, will the car misjudge a 50 cm obstacle as nearer or farther?
Nearer. Sound travels faster in hot air, so the echo returns sooner. The code assumes a fixed speed of sound, so it calculates a shorter distance. The error is small (a cm or two), but it is always in the “too close” direction.