Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Submission requirements for this project include 2 files: Python Numpy and Pandas Application Code Word or PDF file containing your test and pylint results Python

Submission requirements for this project include 2 files:

Python Numpy and Pandas Application Code

Word or PDF file containing your test and pylint results

Python Applications for this lab: (total 100 points): This lab consists of two parts.

1. (80 points) allows a user to enter and validate their phone number and zipcode+4. Then the user will enter values of two, 3x3 matrices and then select from options including, addition, subtraction, matrix multiplication, and element by element multiplication. You should use numpy.matmul() for matrix multiplication (e.g. np.matmul(a, b) ). The program should compute the appropriate results and return the results, the transpose of the results, the mean of the rows for the results, and the mean of the columns for the results. When entering data, the application should use regular expressions and/or Pandas functionality to check the format of the phone number and zipcode. You should check that each value is numeric for the matrices. The user interface should continue to run until the user indicates they are ready to exit. A user interface might look similar to this:

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

If an inappropriate entry is detected, the program should prompt for a correct value and continue to do so until a correct value is entered.

Hints: 1. Use numpy, pandas and regular expressions as appropriate. 2. Create and use functions as often as possible 3. Use comments to document your code 4. Both integers and float values are acceptable 5. Use comments to document your code 6. Test with many combinations. 7. Use pylint to verify the code style the goal is a 10!

2. (20 points) Document your testing results using your programming environment. You should also include and discuss your pylint results for the application. The test document should include a test table that includes the input values, the expected results and the actual results. A screen capture should be included that shows the actual test results of running each test case found in the test table. Be sure to include multiple test cases to provide full coverage for all code and for each function you develop and test.

Welcome to the Python Matrix Application **** Do you want to play the Matrix Game? Enter y for Yes or N for No: Y Enter your phone number (XXX-XXX-XXXX: 555-555-55 Your phone number is not in correct format. Please renter: 555-555-5555 Enter your zip code+4 (XXXXX-XXXX): 21022-3213 Enter your first 3x3 matrix: 1 2 4 4 2 1 3 8 9 Your first 3x3 matrix is: 1 2 4 4 2 1 3 8 9 Enter your second 3x3 matrix: 3 2 1 7 25 5 2 1 Your first 3x3 matrix is: 3 2 1 7 2 5 5 2 1 Select a Matrix Operation from the list below: a. Addition b. Subtraction c. Matrix Multiplication d. Element by element multiplication a You selected Addition. The results are: 4 4 5 11 4 6 8 10 10 The Transpose is: 4 11 8 4 4 10 5 6 10 The row and column mean values of the results are: Row: 4.33, 7, 9.33 Column: 7.66, 6, 7 Do you want to play the Matrix Game? Enter Y for Yes or N for No: N Thanks for playing Python Numpy **

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_2

Step: 3

blur-text-image_3

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

Practical Issues In Database Management A Refernce For The Thinking Practitioner

Authors: Fabian Pascal

1st Edition

0201485559, 978-0201485554

More Books

Students also viewed these Databases questions