Uploaded by Timothy Studebaker

Coding Exam Instructions (Example)

advertisement
Coding Exam Instructions
This is the instructions for your coding exam. Make sure you read and understand these instructions
carefully.
This exam will test your skills at coding. You have access to any material of your choosing. You can use
any IDE (Spyder, PyCharm etc.) of your choice. You can refer to your notes or browse the Internet and
search for ideas/solutions/code snippets as in real life. Reuse as much code as you want but do not
resubmit earlier work without targeting it to the given problem. You should NOT get help from others in
or out of class using any communication medium.
Scenario: After Freshman Year you are given an Internship to automate some computations as part of a
larger group. You are to provide your solution using the Python language.
You are provided a template file pre-named Custom_Script.py that you should use so that all code by
other interns can be integrated into one complete package. Hence, you must stick to the format dictated by
the template. You will be given a sample test file test_data.csv to help you validate your code, but your
evaluation will be based off a larger test data set that you do not have access to. It should be your intent to
make sure your script will handle all possible test cases as per specification.
The python file you submit must have the name Custom_Script.py as provided to you. This file is
provided as a template along with stub code to read test_data.csv and provide variables Input1, Input2 &
Output for checking your code. DO NOT CHANGE THESE NAMES. Assume both script
“Custom_Script.py” and data file “test_data.csv“ are in the same directory. You are provided a zip file
with this document, “Custom_Script.py” and “test_data.csv” at a minimum.
A. Part A: Custom_Script.py: File Read Template Provided
The file read routine is provided in the template Custom_Script.py to read test_data.csv. It provides three
lists Input1, Input2 & Output that you can use to check your function. Run Custom_Script.py before
you start coding to make sure you can see these outputs on your console.
test_data.csv has the format with a header as shown below. Each pair of Inputs and Outputs are
Input1i , Input2i & Outputi. Outputi is the truth value provided corresponding to the inputs Input1i
and Input2i. You should test your function’s output (Your_Output) against this Output. Remember
testing of code using test data, you were taught.
Input1
I10
I11
..
Input2
I20
I21
Output
O0
O1
..
Part A of this problem “file read” has already been solved for you. Your coding solution should be
in the remaining Parts as requested in “Custom_Script.py” template file. The last part is where you
enter your score on Canvas based off the test data provided.
UPLOAD ONLY YOUR Solution Custom_Script.py to Canvas.
This is the digital age. It is your job to ensure you have uploaded the correct file. You have had enough
experience with Lab uploads. If you upload the wrong file you may get no credit.
Download