Python Homework 2-Where is this IP Solved

35.00 $

Category:

Description

Rate this product

# Homework2 – Where is this IP
#### Related Topics
+ Basic python syntax
+ Basic file I/O
+ 1D list, dictionary handling
+ Sorting algorithm
+ Searching algorithm
## Introduction
In this homework, we have a json file with **40000** IPs along with its corresponding city (ofcourse it’s fake data generated by python module `mimesis`), and the task is to design aquery system to search city for specific IP (100 querys) within reasonable time constraint.

## Related Files
We provide the followings files:
+ query.csv
+ ip_data.json

and you should generate a answer file in csv format, refer to docstring for more detailinformation.

## Requirement
Given the template code provided by TA, you need to fulfill all the methods and functions in the code. The score/point for each method or function is explained in the docstring.

## Evaluate
Your script will be tested with following command:

“`
python3 hw2.py <path to ip_data.csv> <path to query.csv> <path to answer.csv>
“`

#### Must Read
+ Do not use third-party packages such as numpy, pandas, and etc.
+ Do not hard-coded the path in your script. **Use relative path**.
+ Built-in `list.sort()` and `sorted()` are prohibited, you should implement your sort.
+ Do not copy others code. (0 scores for punishment)

  • HW2-yib6zk.zip