429,116 Members | 1,509 Online
Need help? Post your question and get tips & solutions from a community of 429,116 IT Pros & Developers. It's quick & easy.

# calculating slowest speed

 P: 6 Hello, I'm trying to change this script so that it calculates the speed of the slowest walker rather that the fastest walker. I know the change needs to happen in the while or if loop, but I don't know what exactly to change. I'm still new to python and I'm not really sure where to start, any help would be appreciated. Thanks! Expand|Select|Wrap|Line Numbers num_walkers = float(input("How many walkers in your group? ")) dist = float(input("Enter the distance: ")) time = float(input("Enter the time: ")) speed = dist/time i = 1 high_speed = speed while i < num_walkers:     dist = float(input("Enter the distance: "))     time = float(input("Enter the time: "))     speed = dist/time     if speed > high_speed:         high_speed = speed     i = i + 1 print("The fastest speed in the walking group is: ",high_speed) Feb 4 '15 #1

What does line 11 do?