CIS115 Lab 5 New – Race Time Sorting in Python- python code, word document containing code and 3 screenshots – Perfect Solution – Instant Delivery
CIS115 Week 5 Lab Overview Title of Lab: Race Time Sorting in Python Summary Store the times into…
________________________________________
CIS115 Week 5 Lab Overview
Title of Lab: Race Time Sorting in Python
Summary
Store the times into arrays called Chevy[ ] and Ford[ ]. Then list the winner of each pair, giving the number of seconds the winner won by. At the end declare which team won based on which team had the most wins.
Deliverables
• A source code Python file.
• A Word document containing both source code and the screen print of the program outputs.
Lab Steps
There are eight cars in each team called Chevy and Ford. One car from each team races its opponent on the drag strip. Read in the racing times for the eight Chevy cars and then read in the times for the eight Ford cars.
Sample Match:
—Input Chevy Times—
Enter time for Chevy Car 1: 5.4
Enter time for Chevy Car 2: 7.2
Enter time for Chevy Car 3: 4.0
Enter time for Chevy Car 4: 9.1
Enter time for Chevy Car 5: 5.8
Enter time for Chevy Car 6: 3.9
Enter time for Chevy Car 7: 6.2
Enter time for Chevy Car 8: 8.1
—Input Ford Times—
Enter time for Ford Car 1: 5.8
Enter time for Ford Car 2: 6.9
Enter time for Ford Car 3: 3.9
Enter time for Ford Car 4: 9.2
Enter time for Ford Car 5: 5.8
Enter time for Ford Car 6: 3.8
Enter time for Ford Car 7: 6.0
Enter time for Ford Car 8: 8.5
And the winners are:
Chevy by 0.4 sec
Ford by 0.3 sec
Ford by 0.1 sec
Chevy by 0.1 sec
Tie!
Ford by 0.1 sec
Ford by 0.2 sec
Chevy by 0.4 sec
And the winning team is: F O R D !
Specifications:
• Accept the racing times for each of the Chevy cars into the array Chevy[ ].
• Accept the racing times for each of the Ford cars into the array Ford[ ].
• Then declare the wining car for each race, giving the winning time in seconds.
• If the times are identical, then declare the race was a tie.
• Finally, declare which team won the match, assuming a tie is possible.