Skip to content
← Back to Community
(1) Prompt the user for a title for data. Output the title. (1 pt)
Profile icon
SushilKafle

(1) Prompt the user for a title for data. Output the title. (1 pt)

(2) Prompt the user for the headers of two columns of a table. Output the column headers. (1 pt)

(3) Prompt the user for data points. Data points must be in this format: string, int. Store the information before the comma into a string variable and the information after the comma into an integer. The user will enter -1 when they have finished entering data points. Output the data points. Store the string components of the data points in a list of strings. Store the integer components of the data points in a list of integers. (4 pts)

(4) Perform error checking for the data point entries. If any of the following errors occurs, output the appropriate error message and prompt again for a valid data point.

(5) Output the information in a formatted table. The title is right justified with a minimum field width value of 33. Column 1 has a minimum field width value of 20. Column 2 has a minimum field width value of 23. (3 pts)

(6) Output the information as a formatted histogram. Each name is right justified with a minimum field width value of 20. (4 pts)

Voters
Profile icon
SushilKafle