CS 200 - Fall 2023. 11/15/2023.


[Home]

Welcome to CS 200!

Video of the day

SQL Socratica.

I hereby solicit suggestions for the video of the day. Please email me your ideas with explanations. Selected entries will win 5 homework points. If your video is played at the beginning of class, you must also briefly explain something about the video and something about yourself - in person.

Logical Problem of the day

import emoji 
elist = [':grinning_face:', ':mouse:', ':skull:', ':passport_control:', ':fire:']
for e in elist:
  print (emoji.emojize(e))
What is the output of the above code?

See emoji pypi and unicode emoji list

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

Lecture 21: SQL.

Administrivia

  • I have Office hours via zoom, meeting ID 459 434 2854. Wednesday 4-6pm.

  • ULA office hours posted on csofficehours.org. See the posting on Ed Discussions for more information.

  • Data Buddies survey.
    The annual nationwide survey of CS departments (a.k.a. “Data Buddies”) is now live: https://cerp.co1.qualtrics.com/jfe/form/SV_9vFybdrfLKUkVcq/?id=yale_cs

    This survey measures retention and persistence among CS students, including undergraduate majors, non-majors, and graduate students. It is the main tool that the department will be using to both gauge our diversity efforts, and compare against peer CS departments.

    It is run externally by the Computing Research Association, which only provides aggregate data. At no point will we have access to individual answers or identities.

    We will be using the survey results to set and prioritize future department initiatives, so this is a great chance to have your voice heard. Please fill it out!

  • Homework assignments: [Assignments]. hw6 is available. You will submit with gradescope.

  • bytecode for lambda expressions
    import dis
      
    a = lambda x: x + 4
    b = lambda y: y + 3
    
    dis.dis(a)
    dis.dis(b)
    

  • Unbound local variable exception.
    x = 5
    def f1():
      return x + 5
    
    def f2():
      x += 5
      return x
    
    dis.dis(f1)
    dis.dis(f2)
    
    See Global, Local and Nonlocal variables in Python

    Databases and SQL

    def display(obj):
      for x in dir(obj):
        print (x, '\t', getattr(obj, x))
    

    SQL notebook Lesson 14

    hw6: create a unique database file:

    dbfile = "/tmp/mydb" + str(os.getpid()) + ".db"
    
    Although, the autograder might be happier without a UNIX filename.

    Cryptography

    Cryptography notebook

    Getting to know UNIX

    UNIX Introduction Principle 5.
    [Home]