Question: Assignment: phoney Module, v . 2 CIT 3 0 9 0 0 What s the Big Idea? Update your existing phoney module to add additional

Assignment: phoney Module, v.2
CIT 30900
Whats the Big Idea?
Update your existing phoney module to add additional cleaning logic to your clean_phone_numbers() function.
IMPORTANT: Use Git to Branch Your Work
PRIOR to starting new code on this project, follow the instructions for using Git from the CIT 30900 workbook.
You MUST:
1. Create a local Git repository that contains all your files from v.1
2. Add all your files and create a commit
3. Create a new branch of the repository named v1 that preserves your work from the previous assignment
4. Switch back to the main branch and make your updates to the project as specified below
You MAY (but are not required to):
1. Create a remote repository on GitHub.com
2. Push your code to your remote repository with the command
git push origin --all
3. REMEMBER: Your GitHub.com repository should be set to PRIVATE
Obtain New Test Data
You are building on your previous version of this project.
HOWEVER, you MUST obtain a new set of phone numbers to use with this new version of your program!!
Instructions to obtain this data are on Canvas.
Updated Requirements
You will update your clean_phone_numbers() function according to the following requirements:
Original Requirements
1. clean_phone_numbers(): Accepts a list of phone numbers and returns a list of phone numbers that contain precisely 10 digits. It removes any special characters from the numbers (parenthesis, hyphens) and removes any number that is not precisely 10 characters long
Additional Requirements
In North America, phone numbers consist of three parts: ABB-CDD-ZZZZ where:
ABB: the area code
CDD: the exchange
ZZZZ: the station code/line of the individual
Using regular expressions, you should further filter the phone numbers according to the following rules:
1. The FIRST digit in the area code (labeled A in the pattern above) CANNOT be a 1 or a 0.
2. The FIRST digit in the exchange (labeled C in the pattern above) CANNOT be a 1 or a 0.
3. The EXCHANGE (labeled CDD in the pattern above) CANNOT be equal to 555
Hints
Do not try to accomplish all of the filtering in a single regular expression. Use multiple expressions to filter the list of phone numbers.
o It is possible to do this all in one, but thats not important right now. The purpose of this assignment is to learn how to apply regular expressions not become the worlds foremost expert on them.
Commit and Branch!
When you are finished with the updates to your program, do the following:
1. Add and commit your files using Git
2. Create another new branch (named v2) that preserves your work at this point in the program
3. Switch back to the main branch
4.(Optional) Push all your branches to GitHub.com with the command git push origin --all
Complete instructions can be found in the CIT 30900 workbook.
Submission Instructions
To submit, zip the following files and attach them to Canvas:
1. phoney.py
2. index.py
3. phone_numbers.csv (NOT the sample CSV provided to you)
Rubric
Requirement Points Available
Regular expression to find 0 or 1 at the start of the area code 5
Regular expression to find 0 or 1 at the start of the exchange 5
Regular expression to find exchanges that are 5555
Total: 15

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!