CS 2000 - Spring 2026.


[Home]

Welcome to CS 2000! 2/23/2026

Video of the Day

Python: list comprehensions from Socratica (fixed)

  • map, filter, and reduce
  • Booleans
  • Numbers (version 3)
  • Dictionaries
  • text files
  • Regular Expressions
  • urllib
  • Classes and Objects
  • Prime Numbers

    Logical problem of the day

    What day of the week does NOT end in the letter Y? It's not "tomorrow". (My daughter Alexandra solved this problem when she was three.)

    https://pollev.com/slade You may also download the app to your phone. Use the "slade" poll id.

    Canvas Quiz of the Day (need daily password)

    Most days, there will be a simple canvas quiz related to the lecture. You need a password to activate the quiz, which I will provide in class. These quizzes will count toward your class participation grade. The quiz is available only during class.

    Click for today's quiz. Note: to reward attendance, in-class quizzes are now worth 5 homework points.

    Python Module of the Day

    folium. Here is a sample program: myfolium.py. Output: myfolium.html

    There are hundreds of Python modules. Going forward, I invite students to present their own selected Python module of the day, along with some sample code. Send me an email. Students whose submissions are selected will present their modules in class and earn 5 extra homework points.

    Lecture 12: Python.

    Administrivia

  • I have office hours Mondays and Wednesdays from 2:30-3:30pm pm, on zoom, id 459 434 2854.

  • ULA office hours are found at Ed Discussions on Canvas

  • Epigrams in Programming, Alan Perlis.

  • Homework assignments: [Assignments]. hw4 is now available. hw3 extension to Wednesday 2/25.

    Announcements

  • Let us know if you have an upcoming event you would like to share with the class.

  • You may provide mid-semester feedback on canvas starting February 16th and ending February 23rd. It is anonymous.

  • Final exam scheduled for Monday, May 4, 2pm. RTBA.

    Midterm Exam

    In 2022, the New Yorker ran the above cartoon. At first, I thought it referred to our exams.

    The midterm will be Thursday February 26th at 7pm in DL 316. It will be a 2 hour hand written exam. No computers. No notes. No books. No kidding. Students registered with Student Accessbility Services will take the exam in room KT 219.

    Here is a practice exam. (solutions). Practice UNIX script. (UPDATED) (solutions). mt.py code for practice midterm

    Here is a great resource to practice regular expressions https://regex101.com/ Also, see www.regular-expressions.info which has a tutorial as well as useful examples, including HTML tags, email addresss, IP addresses, dates, credit cards, and lots more.

    Also, check out Regular Expression Crosswords

    Also, the paper Music and Computation, discussed below, is also in scope, up to but not including Music. There will be true/false questions about binary encodings of numbers, text, images, and sound. No questions about music.

    I asked AI for sample questions. See truefalse.a.txt and truefalse.b.txt.

    Sophia held a review session. Friday February 20th, 2-5pm., DL 316 (same as exam room).

    Python idioms:

    1. Swap two variables: a, b = b, a
    2. Reverse a string: s[::-1]
    3. Check palindrome: s == s[::-1]
    4. Get factorial: Math.prod(range(1,n+1))
    5. Flatten a list: [i for sub in lst for i in sub]
    6. Find even numbers: [x for x in range(10) if x % 2 == 0]
    7. Merge two dicts: {**d1, **d2}
    8. Count item occurrences:
      from collections import Counter
      Counter(lst)
    9. Get unique elements: set(lst)
    10. List to string: ''.join(str)
  • Python List Methods (from Facebook)
  • Important Methods in Python (from Facebook)
  • Python Code Challenge (from Facebook)
  • Another Python Code Challenge (from Facebook)
  • Be familiar with the collections module, specifially, the Counter and namedtuple classes.

    Getting to know Python

    Everything is bits!

    Music and Computation, discusses the spectrum of binary encoding. It will be on the first midterm exam, except for the music part. - negative integers.

    Object Oriented Programming

    Oop.html (jupyter) object oriented programming. hamlet.py

    F String Formatting

    Review hw3. configurations.

    Digital Gates and Circuits

    Getting to know UNIX

    UNIX Introduction Principle 3.
    [Home]