it would probably be cleaner here to just use an 'if', i.e.

```python
if overallAvgSpeed == 0:
    improvementRatio = 0
else:
    improvementRation = avgSpeed / overallAvgSpeed
```