Average Speed Calculator

Converted the if statement to a ternary statement.