Assignment 14 — CSV datasets
Due Friday, October 5
Problem check_it_out.py
- The program prompts and gets two values: the name of a CSV data set of integer values, and a search value. The program prints the number of occurrences of the search value for each row in the dataset. It also prints the total number of occurrences of the search value. There is no other output.
- The data set is stored in web folder:
http://www.cs1112.org/datasets/csv/
. One possible dataset is int_nbrs1.csv
12,5,22,6
1,13,16,2
8,23,7,6,6
5,8,5,22
And another possible dataset is int_nbrs2.csv
4,9,2,5,7
2,7,5,7
3,6,9,4,1
5,1,6,4,4
4,9,1,7
2,6,8
Two sample runs
Enter name of dataset: int_nbrs1.csv
Enter search value: 6
1
0
2
0
3
Enter name of dataset: int_nbrs2.csv
Enter search value: 4
1
0
1
2
1
0
5
© 2019 Jim Cohoon | Resources from previous semesters are available. |