CS 2000 - Fall 2025.


[Home]

Welcome to CS 2000! 10/20/2025

Video of the Day

Socratica Python videos:

Logical problem of the day

What does the following code do?

x = 'x = {!r};print(x.format(x))';print(x.format(x))

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

See Quine see also: examples

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. Note: each quiz is now worth 5 points.

Click for today's quiz.

Lecture 14: Data Structures.

Administrivia

  • I have office hours Wednesdays from 4-6 pm, on zoom, id 459 434 2854.

  • I will be available for lunch on Mondays at 1 pm in Morse.

  • ULA office hours are found at Ed Discussions on Canvas.

  • CS Peer Advisers. Fall 2025 Peer Advisors Office Hours Schedule.

  • Homework assignments: [Assignments]. hw4 is now available.

  • Python Tutor

    Announcements

  • Yale Information Society Project See this week's events.

  • Office of Career Services STEMConnect Pop Up advising Fall schedule. Drop in to one and have your resume reviewed, hear advice about finding internships, and learn more about how to get connected to alumni for networking opportunities.

    Mid-semester Feedback.

    When I worked on Wall Street, we called this the "voice of the customer" or just VOC.

    What is helping your learning in this class?

    What elements of the class are hindering your learning? What could the instructor change to improve your learning experience in this class? What could you do differently to improve your learning experience in this class? Note re PowerPoint: PowerPoint Is Evil. Power Corrupts. PowerPoint Corrupts Absolutely. (Re: Edward Tufte, Yale Professor of political science, computer science, and statistics.) Like complaining that no music should be more than 3 minutes long because that's the length of a pop song.

    Also, cognitive psychology research affirms that human memory has been optimized for episodic memory over semantic memory. That is, it is easier for people to remember stories than lists of facts. Moreover, your career is situated in a stream of scientific and technologic developments. You should appreciate an understanding of how we arrived at where we are in the hope that it will inform where you will be going. Science is history. That goes for computer science as well.

    Midterm Exam II: Thursday November 13th, 7pm, DL 220

    The second midterm will similar to the first. You will have 2 hours. Here is a sample midterm exam. (solutions) There will also be a question on data structures.

    There will be a UNIX question, as in the first midterm. Here is a sample UNIX transcript (solutions) UNIX will cover through principle 4.

    old review slides

    Data Structures

    DataStructures.html (jupyter) Data Structures

    Try in Python Tutor

    class stack:
     
        def __init__(self, items = []):
            ''' Constructor for a stack.  Initialize the list of items and the size. '''
            ## Why not say: self.items = items ?
            self.items = items
            self.size = len(items)
    
        def push(self, item):
            ''' add an item to the end of the stack. '''
            self.items.append(item)
            self.size += 1
    
    x = stack()
    y = stack()
    x.push(1)
    y.push(2)
          

  • Iterators.html
  • Decorators.html
  • Exceptions.html

    Getting to know UNIX

    UNIX Introduction Principle 3.
    [Home]