CS 2000 - Fall 2025.


[Home]

Welcome to CS 2000! 10/6/2025

Video of the Day

Socratica Python videos:

Logical problem of the day

How can you delete a UNIX file named "-f"?

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

In CS 2020 you will write proofs like the following.

Inductive Proof of Wednesday's logical problem (from Francesca Slade):
For 2n - 1 dollars you'll need a minimum of n envelopes.

Base case:
21 - 1 dollars = 1 dollar needs at least 1 envelope.
22 - 1 dollars = 3 dollars needs at least 2 envelopes

Inductive step:

Assume that for 2n - 1 dollars you need a minimum of n envelopes
Prove that for 2(n+1) - 1 dollars you need a minimum of n+1 envelopes

You need to prove 2 things:

I. It's possible to use n+1 envelopes
II. n+1 envelopes is a minimum

I. By assumption you can get any number between 1 and 2n-1 with n
envelopes, put 2n dollars in your second envelope, now for any number
between 2n and 2(n+1) - 1 use your 2n dollars envelope and the
remainder will be between 1 and 2n -1 and use up to n+1 envelopes to
construct that amount.

II. With M envelopes you can make 2M distinct values (including 0
dollars, so really 2M - 1 distinct positive values), for each of the M
envelopes you either include it or don't, so you need a minimum of M
envelopes to describe 2M - 1 positive numbers.

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 11: Binary Encoding / OOP.

Administrivia

  • You may provide mid-semester feedback on canvas starting October 6th and ending October 13th. It is anonymous.

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

    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 October 9 at 7pm in DL 220. 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 ML 211, across the street.

    Here is a practice exam. (solutions). Practice UNIX script. (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, 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.

    Here is the document without the music section: Binary Encoding. Try this prompt with your favorite AI bot: Using the document found at https://zoo.cs.yale.edu/classes/cs200/lectures/BinaryEncoding.pdf please generate 20 sample true or false exam questions. Note: today the bots complain that they cannot load web files. Let me know if you find a way around this. In the mean time, I sent you 100 sample T/F questions on Friday and today!

    Review session: Saturday, October 4, 10am - Noon. AKW (51 Prospect Street) Room 200, Sophia Dai. Review slides (without answers) Review slides (with answers)

    I have decided not to include an object-oriented programming question in the first midterm. Also, the true/false questions regarding binary encoding are taken from the 200 questions generated by Gemini. I sent you 100 sample T/F questions on Friday and another 100 on Monday.

    Getting to know Python

    Hapax legomenon (from UNIX tr example at the end of principle 2.) See Shakespeare scatter plot.

    Everything is bits!

    See Music and Computation. GIF.

    Object Oriented Programming

    Oop.html (jupyter) object oriented programming.

    F String Formatting

    Review hw3.

    Digital Gates and Circuits

    Getting to know UNIX

    UNIX Introduction Principle 3.
    [Home]