Question: Write a program called LongDistanceSwim that reads in the distance Nyad swam and the time it took her to cover that distance for each year

Write a program called LongDistanceSwim that reads in the distance Nyad swam and the time it took her to cover that distance for each year listed in the tablefrom spreadsheet. The program will read the information sequentially store the values(distance and time)in variables. The program should then compute the speed for each year. The program should also compute the average speed. An example of the programs execution sequence is shown below. The output should be displayed in a tabular format as shown below the sample output. The output should look like this:

Write a program called LongDistanceSwim that reads in the distance Nyad swam

Enter the distance Diana Nyad swam in 1974: 22 How many hours did it take Nyad to swim the distance? 8 Enter the distance Nyad swam in 1975: 28 How many hours did it take Nyad to swim the distance? 8 Enter the distance Nyad swam in 1978: 76 How many hours did it take Nyad to swim the distance? 42 Enter the distance Nyad swam in 1979: 102 How many hours did it take Nyad to swim the distance? 27 Enter the distance Nyad swam in 2013: 110 How many hours did it take Nyad to swim the distance? 53 +- | Year | Distance (miles) | Time (hour) | Speed (miles/hour) | 1974 | 1975 | 1978 | 1979 | 2013 | 22 miles | 28 miles | 76 miles | 102 miles | 110 miles | 8 hours 18 hours | 42 hours | 27 hours | 53 hours | 2.75 | 3.5 | 1.8095238095238095 | 3.7777777777777777 | 2.0754716981132075 Diana Nyad's average speed is: 2.7825546570829593 miles/hour

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!