Question: Main table data file to correct: TrigTable.txt Sample table data files to correct: TrigTable_Example1.txt TrigTable_Example2.txt Corrected versions of the two sample files above: TrigTableCorrect1.txt TrigTableCorrect2.txt

 Main table data file to correct: TrigTable.txt Sample table data files

to correct: TrigTable_Example1.txt TrigTable_Example2.txt Corrected versions of the two sample files above:

TrigTableCorrect1.txt TrigTableCorrect2.txt Provide contents of file in text. Page of 2 ZOOM

Main table data file to correct:

TrigTable.txt

Python Project: Correcting Table Errors Trig tables with some errors There is

Sample table data files to correct:

TrigTable_Example1.txt

a text file available on CatCourses (TrigTable.txt) that has the results ofTrigTable_Example2.txt

six trigonometric functions at some angles between 0 and 90. As sometimes

Corrected versions of the two sample files above:

TrigTableCorrect1.txt

happens in various real tables of data like this, some of theTrigTableCorrect2.txt

entries in the table are erroneous, though each angle (row) will have

Provide contents of file in text.

Page of 2 ZOOM Python Project: Correcting Table Errors Trig tables with some errors There is a text file available on CatCourses (TrigTable.txt) that has the results of six trigonometric functions at some angles between 0 and 90. As sometimes happens in various real tables of data like this, some of the entries in the table are erroneous, though each angle (row) will have no more than one error. So, for example, if it turns out that the sine at a given angle is in error, then we will know that the cosine, tangent, etc. for that angle are correct. Not every angle will have an error. Your TAs will be able to test your code with this file and with others with the same basic layout, but possibly different numbers of rows, columns in different order, etc. Which column is which varies from file to file Note that the table's first column will always be the angle in degrees, but the order of the rest of the columns may vary from file to file. So, any code reading the table will have to read the headers to know which trig value is in which column for that file. The trig values will be sine, cosine, tangent, secant, cosecant, and cotangent and the headers for those functions will be labeled sin, cos, tan, sec, CSC, and cot. Reading and fixing the table Students must independently write a Python program named PythonProject.py that reads the table checks each row for errors and notes any errors found to the console writes a text file with corrected values, this time with the function columns in the order: sin, cos, tan, sec, csc, cot. Use trig identities to detect and correct errors You may not import any modules (like math, etc.) and use any of their trig functions to do any of the work. The lone exception is that you may use the constants math.pi and math.inf if you want. Do the checking and find correct values by using basic trigonometric identities involving the other trig functions on the table. This is just high-school math, but searching the Internet for the trigonometric reciprocal identities and trigonometric Pythagorean identities may be useful. The output table The table that your code writes should be neat (with column headers and values lined up) and show any numerical values with 4 digits to the right of the decimal point. Suggestions: Page PythonProject.py Incorrect value found: sin(0.0000) was 0.5392, instead of 0.8880 Incorrect value found: csc(5.6000) was 0.7482, instead of 11.4679 Incorrect value found: csc (20.0800) was 0.5648, instead of 2.9240 Incorrect value found: cos(40.000e) was 0.0391, instead of 0.7669 And the output file TrigTableCorrecti.txt is on CatCourses. For test file TrigTable_Example2.txt (available on CatCourse), the run looks like C:\Users\brokow\UCM Classes\ME 021\2021 Spring Assignments>PythonProject.py Incorrect value found: csc (0.0000) was 0.7032, instead of inf Incorrect value found: sin(12.6880) was 8.9419, instead of 0.2881 Incorrect value found: sin( 24.0000) was 9.2700, instead of 0.4068 And the output file TrigTableCorrect2.txt is on CatCourses. ZOOM angle 0 3 9 12 15 18 21 24 27 sir. 0.0000 0.0523 0.1045 0.1564 0.2079 0.2588 0.9419 0.3584 0.4067 0.4540 0.5000 COS 1.0000 0.9986 0.9945 0.9877 0.9701 0.9659 0.9511 0.9336 0.9135 0.8910 33 36 sec tar 1.0000 0.0000 1.0014 0.0524 1.0055 0.1051 1.0125 0.1584 1.0223 0.2126 1.0353 0.2679 1.0525 0.3249 1.0711 0.3839 1.0946 0.4452 1.1223 0.5095 1.1547 0.5774 1.1924 0.6494 1.2361 0.7265 1.2868 0.0098 1.3456 0.9004 1.4142 1.0000 1.4945 1.2106 1.5890 1.2349 1.7013 1.3764 1.8361 1.5399 2.0000 1.7321 2.2027 1.9626 2.4586 0.2731 2.7904 2.6051 3.2361 3.0777 3.7321 4.8097 4.7046 6.3925 6.3138 9.5663 3.5144 19.1073 13.0311 inf inf 42 45 49 51 54 57 60 63 66 69 72 75 70 81 cot int 19.0811 9.5144 6.3138 4.7046 3.7321 3.0777 2.6051 2.2460 1.3626 1.7321 1.5399 1.3764 1.2349 1.1106 1.0000 0.9004 0.8098 0.7265 0.6494 0.5774 0.5095 0.4452 0.3839 0.3249 0.2679 0.2126 0.1581 0.1051 0.0524 0.0000 0.8387 0.8090 0.7771 0.7431 0.7071 0.6691 0.6293 0.2700 0.6293 0.6691 0.7071 0.7431 0.7771 0.8090 0.9387 0.0660 0.8910 0.9135 0.9336 0.9511 0.9659 0.9781 0.9877 0.9945 0.9986 1.0000 CSC 0.7032 19.1073 9.5668 6.3925 4.0097 3.8637 3.2361 2.7904 2.4586 2.2027 2.0000 1.8361 1.7013 1.5390 1.4945 1.4142 1.3456 1.2868 1.2361 1.1924 1.1547 1.1223 1.0946 1.0711 1.0515 1.0353 1.0223 1.0125 1.0055 1.0014 1.0000 0.5446 0.5000 0.4540 0.3504 0.3090 0.2588 0.2029 0.1564 0.1045 0.0523 0.0000 ZOOM Press esc to exit full screen angle O 5 10 15 20 25 *********** 0.5392 0.0872 0.1736 0.2588 0.3420 0.4226 0.5000 0.5736 0.6428 0.7071 0.7660 0.8192 0.8660 0.9063 0.9397 0.9659 0.9848 0.9962 1.0000 35 40 45 50 55 60 65 70 tar 0.0000 0.0875 0,1763 0.2679 0.3640 0.4663 0.5774 0.7002 0.8391 1,000 1.1918 1.4281 1,7321 2.1445 2.7475 3,7321 5.6713 11.4301 inf 1.0000 0.9962 0.9848 0.9659 0.9397 0.9063 0.8660 0.8192 0.0391 0.7071 C.6423 0.5736 0.5000 0.4226 0.3420 0.25AB 0.1736 0.0872 0.0000 inf 11.4301 5.6713 3.7321 2.7475 2.1445 1.7321 1.4281 1.1918 1.0000 0.8391 0.7002 0.5774 0.4663 0.3640 0.2679 0.1763 0.0875 0.0000 1.0000 1.0038 1.0154 1.0353 1.0542 1.1034 1.1547 1.2208 1.3054 1.4142 inf 0.7482 5,7588 3.8637 0.5648 2.3662 2.0000 1.7434 1.5557 1,4142 1.3054 1.2208 1,1547 1.1034 1.0642 1.0353 1.0154 1.0038 1,0000 1.7434 2.0000 2.3662 2.9233 3.8637 5.7588 11.4737 inf 85 90 ZOOM Press esc to exit full screen sec sin 0.0000 0.0345 0.0698 0.1015 0.1392 1.0000 0.9994 0.9976 0.9915 angle 0 Z 4 6 8 10 12 14 16 18 20 22 $**555**** 1.0000 1.0006 1.0024 1.0055 1.0093 1.0154 1.0223 1.0306 1.0403 1.0515 1.0642 1.0785 1.0946 1.1126 1.1326 1.1547 tar 0.0000 0.0349 0.0699 0.1051 0.1405 0.1763 0.2126 0.2493 0.2857 0.3249 0.3640 0.4040 0.4452 0.4877 0.5317 0.5774 cot inf 28.6363 14.3007 9.5141 7.1154 5.6713 4.7046 4.0108 3.4874 3.0777 2.7475 2.4751 2.2460 2.0503 1.8807 1.7321 0.9419 0.2419 0.2756 0.3090 0.3420 0.3746 0.2700 0.4384 0.4695 0.5000 0.9848 0.9781 0.9703 0.9613 0.9511 0.9397 0.9272 0.9135 0.8988 0.8829 0.7032 28.6537 14.3.356 9.5668 7. 1853 5,7588 4.8097 4.1336 3.6280 3.2361 2.9238 2.6695 2.4586 2.2012 2.1301 2.0000 26 28 30 ZOOM Press esc to exit full screen angle 0 5 10 15 1.0000 0.9962 0.9848 sin 0.0000 0.0872 0.1736 0.2588 0.3420 0.4226 0.5000 25 30 35 0.9397 0.9063 0.8660 0.8192 tan 0.0000 0.0825 0.1763 0.2679 0.3640 0.4663 0.5774 0.7002 0.8391 1.0000 1.1918 1.4281 1.7321 2.1445 2.7425 3.7321 5.6713 11.4301 inf 0.642A 0.7071 0.7660 0.8192 0.8660 0.9063 0.9397 0.9659 0.9848 0.9362 1.3000 45 50 55 60 cat. int 11.4301 5.6713 3.7321 2.7475 2.1445 1.7321 1.4281 1.1918 1.0000 0.8391 0.7002 0.7071 0.6428 0.5736 0.5000 0.4226 0.3420 0.2588 0.1736 0.0972 0.0000 1.0000 1.0038 1.0154 1.0353 1.0642 1.1034 1.1547 1.2208 1.3054 1.4142 1.5557 1.7434 2.0000 2.3662 2.9238 3.8637 5.7588 11.4737 int irf 11.4679 5.7588 3.3637 2.9240 2.3662 2.0000 1.7434 1.5557 1.4142 1.3054 1.2208 1.15417 1.1034 1.0642 1.0353 1.0154 1.0038 1.0000 80 85 90 0.4663 0.3640 0.2679 0.1763 0.0975 0.0000 ZOOM Press esc to exit full screen sec angle 0 2 2 1.0000 0.9994 0.9976 0.9945 0.9903 6 8 8 10 12 14 16 18 20 22 24 26 28 30 sin 0.0000 0.0345 0.3698 0.1045 0.1392 0.1736 0.2082 0.2419 0.2756 0.3090 0.3420 0.3746 0.4068 0.4384 0.4695 0.5000 0.9781 0.9703 0.9613 0.9511 0.9397 0.9272 0.9135 0.8988 0.8829 0.8660 tan 0.0000 0.0349 0.0699 0.1051 0.1405 0.1763 0.2126 0.2493 0.2867 0.3249 0.3640 0.4040 0.4452 1.0000 1.0006 1.0024 1.0055 1.0098 1.0154 1.0223 1.0306 1.0403 1.0515 1.0642 1.0785 1,0946 1.1126 1.1326 1,1547 inf 28.6537 14.3356 9.5668 7.1853 5.7588 4.8097 4.1336 3.6280 3.2361 2.9238 2.6695 2.4586 2.2812 2.1301 2.0000 ini 23.6363 14.3007 9.5111 7.1154 5.6713 1.7016 4.0108 3.4874 3.0777 2.7475 2.4751 2.2460 2.0503 1.8807 1.7321 0.5317 0.5774

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!