CMSI 1010 Computer Programming & Laboratory, Fall 2022
Hi! This repository stores “original” versions of our course’s lab notebooks. There’s a learning curve for working with them and creating your own copies; the following instructions seek to get you acquainted with this workflow.
Google Colaboratory (or just Google Colab for short) is our course’s chosen mechanism for running Python Jupyter notebooks. Notebooks provide a way to learn about and interact with Python code, without worrying about the operational details involved with computer programming. (you’ll get enough of those in the other assignments!)
In order to work with the notebooks that we will share with you, you will need the following:
- A Google account to follow these instructions successfully (you don’t need to tell us what it is—your Google Drive will serve as your workspace)
- A GitHub account
- Your lab-notebooks repository for the course—click on this link to set it up: https://classroom.github.com/a/lxEHqdps
Important: Make sure to activate popup windows for colab.research.google.com—it needs those to occasionally ask your permission to access GitHub
The notebooks that we provide are “final copies” that can’t be modified—that way you can get back to them fresh at any time.
- To make changes to them, you will make a copy of the notebook in Google Drive
- To submit your notebook, place a copy of your worked-on notebook in the 1010-lab-notebooks repository on GitHub
- You may copy your notebook to GitHub as frequently as you like
- Click on our shared notebook link to open it in Colab
- From the Colab menu, choose File > Save a copy in Drive to create your own private copy of the notebook
- Work on your copy of the notebook as needed
- When you are ready to submit the notebook, first choose Edit > Clear all outputs to reset all of the notebook’s code blocks
- Choose File > Save a copy in GitHub to create your submitted copy of the notebook
- Make sure to set your LMU-CMSI-1010/lab-notebooks-YOURID Repository as the destination of the file to save
- Choose
main
as the Branch into which to save - Provide a Commit message—describe what’s different in your version of the notebook
You may repeat the last four steps as frequently as needed in case you want to revise your GitHub copy. Do your work on the Google Drive copy but submit as needed to GitHub.
Every time you save a copy to GitHub, you will add a commit to that file. This way, you can follow how the content of your notebook evolves over time, accompanied by your own description of what you changed.
Here’s an example:
When running our notebooks, Colab may warn you that the code isn’t safe:
For the notebooks that we share with you, go ahead and click on Run anyway. We won’t share any harmful notebooks with you 🤗
For all other notebooks that you might try from the Internet, it’s a good habit to verify that the source/author of the notebook can be relied upon. And that’s why Colab checks with you first!
Click on these links to open them in Colab. Remember, you can’t modify these original versions. Instead, follow the workflow listed above to create a copy for yourself on Google Drive. When you’re ready to submit it, choose Edit > Clear all outputs from the Colab menu then choose File > Save a copy in GitHub to submit it to GitHub.
- Lab00_ProgrammingEnvironment.ipynb
- Lab01_Taking Orders.ipynb
- Lab02_Sorting Hogwarts.ipynb
- Lab03_Heat-Check.ipynb
- Lab04_Take a Walk.ipynb
- Lab05_Walk_with_Purpose.ipynb
- Lab06_Mixig_Strings.ipynb
- Lab07_Making_a_List.ipynb
- Lab08_Text_Similarity.ipynb
- Lab09_Choosing_Data_Structures.ipynb
- Lab10_Introduction_to_Recursion.ipynb
- Lab11_Turtle_Fractals.ipynb
- Lab12_Recursion_Recursion.ipynb
- Lab13_Making _Classes.ipynb
- Lab14_Rock_Paper_Scissors.ipynb
- Lab15_Histogram.ipynb
Note: These links are not the same as clicking on the filenames in GitHub—they have additional information that actually open these notebook files in Google Colaboratory.
You can actually synthesize these links manually in case you don’t have access to this page—see the “Loading Public Notebooks Directly from GitHub” section in Using Google Colab with GitHub for those instructions.
Google Colab has a host of links (delivered as notebooks themselves) that can help familiarize you with the environment:
- The top-level introduction is a good start
- This overview shows some specifics on how Jupyter notebooks work within Colab
- The Markdown guide shows you how to create/edit the text portions of a notebook
- Using Google Colab with GitHub will give you additional details on how Colab and GitHub interact