Question: It is time to enroll in classes for the spring 2019 semester. The schedule is available programatically via a JSON api http://api.fit.edu/courses/v1/courses?term=spring Write a Python

It is time to enroll in classes for the spring 2019 semester. The schedule is available programatically via a JSON api

http://api.fit.edu/courses/v1/courses?term=spring 

Write a Python progrm to read the schedule into a Python dictionary and then answer queries.

Input and Output Specification

Each line of the standard input stream is a query. Each query is a space-separated list of terms. Each term consists of key and regular expression. Here is an example of a query.

subject=CSE course_number=4... 

The only keys allowed are those with string value fields (i.e., no lists, etc). The regular expression is in the Python re syntax (raw). A record matches if the regular expression matches the entire value for every key (conjunction).

For each query print all the matching records in the following form:

crn subject course_number section days begin_time end_time instructor 

For example,

84466 CSE 2010 01 MW 1400 1515 Chan 

Print a blank line after every set of matches.

If there are no matches, print the line:

NO MATCHING RECORDS
(And, follow it with a blank line.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!