City College of San Francisco
Course Outline of Record
Course Status: Active
I. GENERAL DESCRIPTION
A. Approval Date April 2018
B. Effective Semester Spring 2019
C. Department Computer Science
D. Course Number CS 131B
E. Course Title Programming Fundamentals: Python
F. Course Outline Originator Jonathan Potter
F. Co-Contributor(s):
Aaron Brick
Craig Persiko
G. Department Chairperson Craig Persiko
H. Dean David Yee
II. COURSE SPECIFICS
A. Hours
Lecture: 70
Homework: 140
Total Hours: 210
B. Units 4
C. Prerequisite None
    Corequisite None
    Pre/Corequisite None
    Advisory CS 110A
    Advisory Pre/Corequisite None
D. Course Justification This course is designed for computer science majors who plan to transfer to a four-year school. It also fulfills requirements for the following certificates: Web Application Programming, Database Programming: MySQL/Open Source Technologies, and Data Science Fundamentals. Finally, it fulfills CCSF GE Area A: communication and analytical thinking requirement.
E. Field Trips No
F. Method of Grading Letter or Pass/No Pass
G. Repeatability Course is not repeatable
III. CATALOG DESCRIPTION
This course covers programming fundamentals using the Python language. Python is interpreted, interactive, and object-oriented. Recommended for general-purpose programming, system administration, or web programming. Topics include classes, objects, inheritance, polymorphism, design and implementation of abstract data types, dictionaries, lists, list comprehensions, files, modules, and mutable and immutable types.
IV. STUDENT LEARNING OUTCOMES
Upon completion of this course, a student will be able to:
  1. Develop working and maintainable Python programs that make use of standard and exceptional control flow
  2. Develop working and maintainable object-oriented Python programs using classes and objects
  3. Use Python data structures to store, update, and retrieve data
  4. Develop and use programmer-defined modules in a Python program
  5. Use regular expressions to identify patterns in strings and to make substitutions
V. CONTENTS
  1. Foundational knowledge
    1. Features of the Python programming language
    2. How to run Python programs
      1. Interactively
      2. Module files
      3. Unix-style script files
      4. Command-line arguments and sys.argv
    3. Basic statements
    4. Selection and repetition structures
    5. Types and operators
    6. Defining functions
    7. Object scope and namespaces
  2. Collections
    1. Strings
      1. String formatting
      2. String manipulation functions
    2. Lists and tuples
      1. Changing lists in place
      2. Packing
      3. Unpacking
    3. Dictionaries
      1. Membership test
      2. Changing dictionaries
      3. Accessing keys as a list
    4. Sets
      1. Unions, intersections, and differences
      2. Removing duplicates
    5. Indexing and slicing
    6. Searching
    7. Sorting
      1. The sorted function
      2. The key function for sorting
  3. Mutability vs. immutability
    1. Working with immutable types
      1. Strings
      2. Tuples
    2. Working with mutable types
      1. Lists
      2. Dictionaries
    3. Mutable vs. immutable function arguments
    4. Mutable vs. immutable default argument values
    5. Equivalence vs. identity
  4. Files
    1. Data encoding
      1. Single-byte vs. multi-byte encoding
      2. The bytes class
    2. The os module
      1. listdir
      2. path.exists
  5. Modules
    1. Advantages of modules
      1. Reusability
      2. Using precompiled code
    2. Modules and scope
    3. Import model
      1. Importing one or more modules
      2. Importing identifiers from a module
      3. Assigning names for modules and module identifiers
  6. Classes and objects
    1. Instantiation
    2. Instance attributes and class attributes
    3. Methods with and without default arguments
    4. Operator overloading
      1. Unary operators
      2. Binary operators
    5. Inheritance
      1. Base classes
      2. Derived classes
      3. Overriding base class methods
      4. Composition vs. inheritance
      5. Polymorphism
    6. Resolution order
    7. Designing with classes
      1. Hidden attributes
      2. Getters and setters
      3. Special methods
  7. Exceptions
    1. Raising an exception
    2. Exception handling
      1. try/except/else
      2. try/finally
    3. Exception objects
      1. String-based exceptions
      2. Class-based exceptions
      3. General raise statement forms
    4. Exception catching modes
  8. Regular expressions
    1. Compiling regular expressions
    2. Manipulating regular expression objects
    3. Regular expressions characters
      1. Repetition
      2. Placement
      3. Grouping
    4. Classes and special sequences
    5. Statically calling functions in the re module
  9. Programming paradigms
    1. Object-oriented programming
    2. Recursive programming
    3. Iterative programming
    4. Functional programming with comprehensions
VI. INSTRUCTIONAL METHODOLOGY
  1. Assignments
    1. In-class activity: Individual and group problem-solving exercises on topics such as: using Python operators with lists, dictionaries, tuples, and files; and using regular expressions with strings
    2. In-class activity: Designing a set of classes related in a multi-leveled inheritance tree
    3. Out-of-class assignment: Readings from textbooks, reference manuals, sample applications, and/or handouts
    4. Out-of-class assignment: Using the Python language to build object-oriented programs
    5. Out-of-class assignment: Writing Python programs to store and manipulate data using lists, dictionaries, tuples, and files
    6. Out-of-class assignment: Writing programs that use regular expressions with strings
    7. Out-of-class assignment: Design, program, and test programs with at least one programmer-defined module in Python
    8. Out-of-class assignment: Completion of in-class assignments that were not finished during class time
  2. Evaluation
    1. Written work: Programming assignments as described above
    2. Exams/Quizzes/Tests: Written quizzes and/or tests that measure the student's knowledge of topics such as: a. The main features of Python b. Writing object-oriented Python programs using classes and objects c. Writing Python programs to manipulate lists, tuples, strings, and files d. Use of regular expressions with strings
    3. Final Assessment: A comprehensive final examination that measures the student's ability to create Python programs
  3. Representative Textbooks and Other Instructional Materials
    1. Lutz & Ascher. 2013. Learning Python, 5th Edition. .
    2. Naomi Ceder. 2010. The Quick Python Book. .
    3. Access to a computer with software such as an SSH client and a Python IDE
    4. Website: How to Think Like a Computer Scientist by Allen B. Downey
    5. Website: Python Documentation
    6. Website: In-Browser Python IDE
VII. TITLE 5 CLASSIFICATION
CREDIT/DEGREE APPLICABLE (meets all standards of Title 5. Section 55002(a))