Skip to content

Wednesday 10/11

PA1 A Debrief…

Files and File I/O

  • Two basic types of files:
    • Text - We'll mostly deal with these.
      • Standard file format for storing text, most commonly UTF-8, which is an extension of ASCII.
      • Each 8-bit sequence corresponds to a single letter.
      • chr() and ord() built-in functions
      • ord("a") -> 97
      • f"{ord('a'):b}" -> 110001
      • chr(97) -> 'a'
    • Binary - Most files you typically interact with.
      • Format is specific to the application: images, audio, formatted documents etc.
  • File I/O
  • The file system

Quiz Instructions

  • Log into the desktop as student with no password.
  • Log into Canvas.
  • Wait until the instructor says to start before accessing Part 1.
  • The quiz can be found in the "Modules" section of Canvas.
  • The entire quiz has a 25 minute time limit.
  • Part 1 (Conceptual):
    • You may not use Thonny (or any other resources) for Part 1.
  • Part 2 (Coding):
    • You have unlimited submissions.
    • You do NOT need to provide docstrings.
    • The autograder will NOT check for PEP8 violations (though you should still use good style.)
    • You must use Thonny as your editor.
    • You may not access any external web pages or other resources.