Question: THE HONG KONG POLYTECHNIC UNIVERSITY Computer Programming ( ENG 2 0 0 2 ) Class 5 Programming Test 1 Name: q , Student No .
THE HONG KONG POLYTECHNIC UNIVERSITY Computer Programming ENG Class Programming Test
Name: Student No
A Instructions
Create a folder yyyyyyyy where yyyyyyyy stands for your student ID number omitting the last letter D under PolyU Home Drive : All your Jupyter Notebook files should be stored under this folder yYYYyYyy Note: this drive and folder location MUST be strictly followed. Do NOT use anv other locations.
At the beginning of each Python program file, add a comment to show your student ID and name.
This paper comprises parts. You may use a new Jupyter Notebook file for each part. Create the files under the folder you created in Step
It is an openbook test; any documents, online or offline, can be consulted during the test.
Your programs need to be well commented. Lacking comments will result in downgrading.
Your programs need to have a good structure. Never write a long program without calling functions.
Do NOT use any techniques that were not mentioned in the lessons. Also, do NOT call a function recursively, ie call functionA inside functionA
Do NOT import any library module except math
Save your files frequently to avoid any accidental loss of data.
After the test, upload the three Jupyter Notebook files under the yYyYyyYy folder to Blackboard as attachments. Click the switch "Browse Local Files".
Time allowed: hour minutes.
B The Programming Task
Background
It is given that the cosine function can be approximated by a series of summation and subtraction of many terms:
~~cdots
where cdots~~ubraceubraceubraceubracecdotsq should noted that the term number, measured radian, and find the factorial which given cdots For example,
~~ubraceubraceubraceubracecdots
Create a new Jupyter Notebook file with the name starting, the application should cal function showMenu that shows the following main menu:
Get a term cosine function
Get the terms cosine function
Get cosine angle radian
Quit
State your choice quit:THE HONG KONG POLYTECHNIC UNIVERSITY Computer Programming ENG Class Programming Test
Name: Student No
A Instructions
Create a folder yyyyyyyy where yyyyyyyy stands for your student ID number omitting the last letter D under PolyU Home Drive : All your Jupyter Notebook files should be stored under this folder yYYYyYyy Note: this drive and folder location MUST be strictly followed. Do NOT use anv other locations.
At the beginning of each Python program file, add a comment to show your student ID and name.
This paper comprises parts. You may use a new Jupyter Notebook file for each part. Create the files under the folder you created in Step
It is an openbook test; any documents, online or offline, can be consulted during the test.
Your programs need to be well commented. Lacking comments will result in downgrading.
Your programs need to have a good structure. Never write a long program without calling functions.
Do NOT use any techniques that were not mentioned in the lessons. Also, do NOT call a function recursively, ie call functionA inside functionA
Do NOT import any library module except math
Save your files frequently to avoid any accidental loss of data.
After the test, upload the three Jupyter Notebook files under the yYyYyyYy folder to Blackboard as attachments. Click the switch "Browse Local Files".
Time allowed: hour minutes.
B The Programming Task
Background
It is given that the cosine function can be approximated by a series of summation and subtraction of many terms:
The user is expected to enter a character of or
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
