CS 2000 - Fall 2025.


[Home]

Welcome to CS 2000! 11/3/2025

Video of the Day

Socratica Python videos:

Image of the Day

Spurious correlations.

Post hoc, ergo propter hoc fallacy.

Logical problem of the day

If a bat and a ball together cost $1.10, and the bat costs a dollar more than the ball, how much does the ball cost ?

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

The formation and revision of intuitions, Meyer and Frederick. Cognition, Volume 240, November 2023. Shane Frederick is a Professor of Marketing at the Yale School of Management.

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 18: PVM + UNIX.

Administrivia

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

  • 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]. hw5 is now available. Need to use Python version 3.10 which has BINARY_ADD, BINARY_SUB etc. Available on the zoo as python3.10 on the following nodes: Perch, Lion, Zebra, Giraffe, Monkey, Ladybug, Grizzly, Cardinal.

    Announcements

  • Computing Research Association (CRA) Data Buddies Survey:
    Dear CPSC 2000 students,

    The Computing Research Association (CRA) is interested in career development among students in computing fields. To that end, we offer you the opportunity to complete their survey, which will take about 10-12 minutes to complete.

    Your contribution to this research helps Yale CS improve our programs and resources to better support your success. Your participation also provides valuable insights to future students considering computing.

    In exchange for your time, you will be given the opportunity to enter a random drawing to win one of two hundred $25.00(USD) Amazon gift cards!

    If you are interested in completing the survey, please follow the link below: https://cerp.co1.qualtrics.com/jfe/form/SV_0OhVJ7LGgQLXATc/?id=yale_cs

    Note that if you completed a survey for CRA in the past, you may have been contacted directly by CRA via email. If you have already completed this survey directly through the CRA invitation, please disregard this message.

    Many thanks!

  • 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.

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

    The second midterm will be 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

    Python Virtual Machine

    PVM.html jupyter notebook - Python Virtual Machine and hw5.

  • bytecode.py
  • pvm.py

  • byterun github code repository
  • byterun - the code.

  • Example with return None. Note: constant folding.
    >>> def f():
    ...   a = 3 + 4
    ... 
    >>> dis.dis(f)
      2           0 LOAD_CONST               1 (7)
                  2 STORE_FAST               0 (a)
                  4 LOAD_CONST               0 (None)
                  6 RETURN_VALUE
    
    >>> def f2():
    ...   a = 3 + 4
    ...   return a
    ... 
    >>> dis.dis(f2)
      2           0 LOAD_CONST               1 (7)
                  2 STORE_FAST               0 (a)
    
      3           4 LOAD_FAST                0 (a)
                  6 RETURN_VALUE
    

    Getting to know UNIX

    UNIX Introduction Principle 3.
    [Home]