Week 1: Introduction#
Laboratory 0
Last updated Jan 8, 2023
00. Content #
Mathematics
N/A
Programming Skills
Latex
Importing Libraries
Functions
Embedded Systems
N/A
0. Required Hardware #
N/A
1. Before Starting #
Let us first set up a file for organizational purposes that will be used to store all files throughout this course. To do this, navigate to the Home directory and add a new folder by right-clicking. Name the folder something that will be easy to find, such as “DSLab_Calc3.” If you’d like to put it at the top of the list of folders and make it even easier to find, add a tilde (~) at the beginning of the name you chose.
Save this and all other files going forward to this folder. It’ll make everything much easier to find and will especially come in handy when submitting the labs at the end of each class. This includes files that are downloaded through links during labs. When you click on a file link, it’ll send you to the GitHub page for that file. To download and save it to your folder, click on the button that says “Raw” on the top right of the file preview (unless it’s a PDF, then just click “Download”). This will take you to a white page with the information in black text. To see the file in the proper environment, right-click the screen and click “Save as…” and once you open it after this, it should appear in the correct environment!
Laboratory ethics#
“I pledge to behave ethically and with honesty in this course. I may discuss approaches for a solution with others, but my submitted lab report will be my own work, including all code. I will not make my finished reports available to other students, even after the semester is over. In particular, I will not post my labs on the Internet or make my files available to other people. I will not be a cheater.”
2. Toy Lab #
Write your name and email below:
Name: me
Email: me @purdue.edu
Skill Checks#
Exercise 1 #
Write the (infinite) geometric series formula using \(\LaTeX\) code.
Hint: If you’re feeling stuck, here’s a short refresher on \(\LaTeX\) from the Data Science Labs on Differential and Integral Calculus.
Write Answer for Exercise 1 Below
Exercise 2 #
Import the Numpy library and rename it as “np”.
Write Answer for Exercise 2 Below
Exercise 3 #
Write a function that returns a list of the first \(n\) positive multiples of 4. Then, call your function to print a list of the first 10 positive multiples of 4.
Bonus: Can you modify your function to return the first \(n\) positive multiples of a given positive integer \(k\)?
Write Answer for Exercise 3 Below
3. Submitting the Lab #
Once you have finished the first lab, you will need to submit it. You will do this by saving it as a PDF and uploading the PDF to Gradescope.
Before you submit, make sure that everything is completely filled out and saved (either by typing Ctrl+S or by clicking the floppy disk icon in the top left of this application). Once you’ve done this,
Navigate to File in the top left of the screen and find Save and Export Notebook As…”. Once the drop down comes up, click on HTML.
Open the html file in the web browser by double-clicking on the file location in Downloads.
In the browser, right-click to choose Print… or use Ctrl+P to bring up the print window. For Destination, select Save as PDF in the drop down menu and click Save.
Turn in the PDF through Gradescope.
Note that you are expected to submit the lab before the end of class every week. Once you’ve done this, you are done and are free to leave!