Please check out the HW0 + Julia Video Walkthrough by Kevin Tracy from last year. Note: this was made for the previous Julia LTS version(1.6.7) and we will be using the latest (and much improved) LTS, but the content in the video is still very much relevant.
All the homeworks are distributed as Jupyter notebooks. Follow these instructions to get everything set up.
- Install Julia by running the one of the following terminal commands depending on your system. This will install the Juliaup installation manager. DO NOT install version-specific binaries.
a. for Windows, runwinget install julia -s msstore, thenjuliaup add ltsto install the LTS version, andjuliaup default ltsto set LTS as the default Julia version. b. for Mac/Linux, runcurl -fsSL https://install.julialang.org | sh -s -- -y --default-channel ltsto achive the same thing. - Clone this repo and put it wherever you want.
- Start a Julia REPL in your terminal using
julia - Install the IJulia using the Julia package manager. In the REPL, enter the package manager using
], then enteradd IJuliato add it to your system path. - In the REPL (hit backspace to exit the package manager), enter
using IJulia - Launch the notebook using
notebook()orjupyterlab() - (Optional) If you use VSCode, instead of steps 5-7, you can install the Julia and Jupyter extensions in VSCode. Make sure you set the
kerneltoJulia lts channelbefore running your code.
Fill out Q1.ipynb and Q2.ipynb.
Feel free to use any method you'd like to export your Jupyter notebook as a PDF (with all the cell outputs shown) and submit on gradescope.
We recommend this method of converting your Jupyter notebook to a PDF because it requires no additional installs (hopefully). It's slightly involved, but it is the most consistent in our experience.
- Open the Jupyter notebook in your favorite web browser (not VS Code) with IJulia.
- Make sure all cell outputs are shown including plots and unit tests' results.
- In the top left corner of the Jupyter menu bar, do
File -> Save and Export Notebook As -> HTML. It should download an HTML file. - Open the downloaded HTML file in your favorite web browser.
- Open up the browser's print menu and select
Save as PDF. - Save PDF and submit on gradescope.
If HTML to PDF does not work, feel free to try other methods: https://mljar.com/blog/jupyter-notebook-pdf/.