REMINDER: For the recording with the mini-quiz built in, you can’t use the “button” link. Instead, use the Canvas button at the very bottom of the page that says Load.... If you get an error saying “cannot access” or “video not available” make sure to try going to the Panopto “tab” on Canvas (left menu bar - Panopto) which will “authenticate you” in Panopto’s system. If you load the mini-quiz any other way (including going through the Panopto tab, you won't receive any credit.

In today’s pre-recorded lecture, we’re talking about how to use functions! By the end of the videos and practice files, you should be able to:

  1. Call a function with arguments
  2. Call a function with optional arguments
  3. Use the print function
  4. Understand what a reporter is
  5. Use the input function

Note that you need to watch this lecture BEFORE coming to class on Wednesday.

For many lectures, there are associated files you can use to follow along with the work we do in IDLE. You can click the button below to download those files. For Mac users, the ZIP file that is downloaded will either be automatically extracted into a folder, or you can simply double click on the ZIP file to extract it. Make sure to move it into your cs110 like we talked about last time. Additionally, there are practice problems available in the slides that AREN’T covered in the pre-recorded video. Try to solve them on your own and then take a look at the solutions in the exercise ZIP file.

Mac Users

For Mac users, the ZIP file that is downloaded will either be automatically extracted into a folder, or you can simply double click on the ZIP file to extract it (turn it into a regular folder). Then you can open any of the .py files by double clicking on the file which will cause it to open in IDLE.

Windows Users

If you’re on a Windows machine, there’s a few extra steps for both of these processes.

To extract a ZIP file, you can follow those instructions here. Note: you must extract these files first in order to use them in IDLE. Otherwise, it will say “read-only” and you will not be able to run or edit the files.

To open any .py files in this course, it’s easiest to:

  1. Open up the IDLE application.
  2. Click on the File menu
  3. Click on the Open... option
  4. Using the pop-up window, navigate to the file you’d like to open!

However, if you want to be able to double click on .py files and open them in IDLE that way, you can do so, it just takes a few setup steps.


Today's Resources

1. Exercise Files

Download Exercise Files

2. Slides

3. Pre-Recorded Lecture Video(s), Mini-Quizzes, and Live Recordings

Available Videos
Link Title Type Duration
Video 1 What is a function? pre-recorded 3:59
Video 2 Syntax of Calling Functions

(MQ - No Longer Available)

video_quiz 6:56
Video 3 Using the print Function? pre-recorded 7:23
Video 4 Turtles! pre-recorded 4:04
Video 5 Syntax of Reporters pre-recorded 3:53
Video 6 Using the input Function pre-recorded 6:15

4. Supplemental Materials

  • Charles Severance - Ch 4: Functions – Python for Everybody (ReadingVideo)