The sound of thunder varies based on the listener's distance from lightning, influenced by atmospher…