Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Section 2: Improve the program Use the skills you learned in section 2 to improve this program. This should improve the appearance of the console

Section 2: Improve the program Use the skills you learned in section 2 to improve this program. This should improve the appearance of the console and the readability of the code. Console Specifications - Use the repetition operator to display separator lines that use 64 characters. - Use spaces, not tabs, to align the columns of data for the players. - Make sure the program always displays the batting average with 3 decimal places. - Display the positions by processing the tuple of valid positions. - When the program starts, use the YYYY-MM-DD format to display the current date and to get the date of the next game from the user. - Make sure the user enters the date in the correct format. - Only display the number of days until the game if the game is in the future. Don't display the number if the game date is in the past or the user doesn't enter a date. - Use a dictionary to store the data for each player. To get this to work, you need to modify the functions that read and write the data to the file so they work correctly with a list of dictionaries. That's because the previous version of this program used the csv module to work with a list of lists, but the csv module doesn't work with a list of dictionaries.
image text in transcribed
Section 2: Improve the program Use the skills you leamed in section 2 to improve this program. This should improve the appearance of the console and the readability of the code. Console Specifications - Use the repetition operator to display separator lines that use 64 characters. - Use spaces, not tabs, to align the columns of data for the players. - Make sure the program always displays the batting average with 3 decimal places. - Display the positions by processing the tuple of valid positions. - When the program starts, use the YYYY-MM-DD format to display the current date and to get the date of the next game from the user. - Make sure the user enters the date in the correct format. - Only display the number of days until the game if the game is in the future. Don't display the number if the game date is in the past or the user doesn't enter a date. - Use a dictionary to store the data for each player. To get this to work, you aced to modify the functions that read and write the data to the file so they work correctly with a list of dietionaries. That's because the previous version of this program used the csv module to work with a list of lists, but the csv module docsn't work with a list of dictionaries

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

DB2 9 For Linux UNIX And Windows Advanced Database Administration Certification Certification Study Guide

Authors: Roger E. Sanders, Dwaine R Snow

1st Edition

1583470808, 978-1583470800

More Books

Students also viewed these Databases questions

Question

Presentations Approaches to Conveying Information

Answered: 1 week ago