Summary + Submission

Take Heart

We’ve covered a lot of ground in this lab! If this is your first experience with programming, it is common to feel a little overwhelmed. It may be helpful to think of programming as a foreign language: you will improve little by little as you get used to the vocabulary and grammar through reading code examples and writing your own code. Programming literacy comes over time and through repetition.

Key Concepts

These are the main topics covered in this lab.

  • Python executes a set of instructions one line at a time.

  • Variables store information, such as numbers or letters, to be used later. Use = to create a variable.

  • A function is a coding recipe used to do small tasks that get used more than once. Functions are defined with def, end with return, and are called with parentheses, func().

  • Program behavior can be controlled with if/else clauses. Using and and or operators is helpful for specifying more complex control flows.

Submitting the Lab

After completing this lab, check your code for errors.

  1. In the Runtime menu at the top of Google Colab, select Restart session and run all.

  2. If any of the cells produce error messages, fix the error(s).

  3. Repeat steps 1 and 2 until there are no error messages. Your code cannot be graded if there are any error messages.

Next, in the File menu on Google Colab select Download > Download .ipynb. The downloaded file can be uploaded to gradescope.com for grading.