CS 1371 Lecture Notes - Lecture 16: Andrelton Simmons, Chipper Jones, Jason Heyward

61 views6 pages

Document Summary

Inputs (1): -(char) an excel file name containing player information. Output files (1): - a . txt file representing the best lineup. You have been been hired as the manager of a baseball team, and must determine your best lineup. Write a function, createlineup, that reads in an excel file containing a column for first name, a column for last name, and a column for on-base percentage (obp). You should then create a lineup with the player with the highest obp first, the second highest obp second, and so on. The lineup should be writtent to a file with the same name as the original, but with "_lineup" appended to the end. Each line of the lineup should be formatted as follows: firstinitial. lastname". For example, if the first batter is named chipper jones, the first line should read "1. The excel file may contain any number of rows. Having an extra blank line at the end of your lineup is okay.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents

Related Questions