Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

IN PYTHON LANGUAGE Student.csv in excel STUDENT ID STUDENT FIRST NAME STUDENT LAST NAME COURSE ID MIDTERM FINAL W9898987 Ashley Brown Math 350 89 89

IN PYTHON LANGUAGE

Student.csv in excel

STUDENT ID STUDENT FIRST NAME STUDENT LAST NAME COURSE ID MIDTERM FINAL
W9898987 Ashley Brown Math 350 89 89
W6254758 Blair Saint Math 360 99 87
W1234567 Hello World CMPS 787 85 85

Part I

1) Read student records from the file Student.csv and store into a dictionary "stdRec":

In [ ]:

2) Store headers into a tuple "header":

In [ ]:

 

In [ ]:

 

3) Store data into a list "data":

In [11]:

data = list

4) Ask user to enter a student number to search "data" for the W# and return all his/her grades for the classes taken:

In [ ]:

 

5) Write the search result into a file with a file name which is consisted of W# and extention "csv". The file will be stored into the folder "RESULT". The first line of the file will have headers:

In [ ]:

 

Part II

1) Ask user to enter two strings "reference" and "pattern":

In [ ]:

 

2) Check if the pattern string is in the reference string. Display the result together with the input data:

In [ ]:

 

3) Split characters of both strings into the sets "sRef" and "sPat":

In [ ]:

 

4) Check if sPat is a subset of sRef. Display the result together with the input data:

In [ ]:

 

Part III

1) Write a class "Search_Pattern" which will accomplish the tasks listed in Part-II. In the task-1, the string pairs "reference" and "pattern" must be read from a file:

In [ ]:

 

2) Generate a test set of "reference" and "pattern" into a file "Test_Data". The test data must test following cases:

a. The pattern is in the reference.

b. The pattern is NOT in the reference.

c. The pattern is NOT in the reference but its items make a subset of the reference

Test the class Search_Pattern using the test data. Display the result together with the input data:

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

Professional SQL Server 2012 Internals And Troubleshooting

Authors: Christian Bolton, Justin Langford

1st Edition

1118177657, 9781118177655

More Books

Students also viewed these Databases questions