650 likes | 765 Views
Lecture 40: CS200 Jeopardy Who wants to be a quadrillionaire ?. David Evans http://www.cs.virginia.edu/~evans. CS200: Computer Science University of Virginia Computer Science. Menu. Final Project Demos Jeopardy Picture. Final. Take-home
E N D
Lecture 40: CS200 Jeopardy Who wants to be a quadrillionaire? David Evans http://www.cs.virginia.edu/~evans CS200: Computer Science University of Virginia Computer Science
Menu • Final • Project Demos • Jeopardy • Picture University of Virginia CS 200
Final • Take-home • Use anything you want except other people and Scheme interpreter, cite any sources you use • Pick up at end of class today • Don’t spend more than 3 hours on the exam. • Turn in before 5:00pm on Monday 6 May, Olsson 236A University of Virginia CS 200
Project Demos University of Virginia CS 200
Thanks! University of Virginia CS 200
Jeopardy University of Virginia CS 200
Jeopardy Rules • $1Q, $2Q, $4Q – raise hand to answer, first team spotted will be asked to answer, whoever is picked must answer right away • Lose value for wrong answer. • All teams answer $10Q questions, answer value at complete discretion of judges • After all questions, there will be Final Jeopardy • Team with the highest total, gets prizes (don’t get cash) University of Virginia CS 200
CS200 Jeopardy 1 1 1 1 2 2 2 2 4 4 4 4 10 10 10 10 Final Jeopardy (All values in $Quadrillions)
Lines of Code 1 What is the value of the Scheme expression: ((lambda (x) ((lambda (y) (* x y)) x)) 3) University of Virginia CS 200
Lines of Code 1 ((lambda (x) ((lambda (y) (* x y)) x)) 3) => ((lambda (y) (* 3 y)) 3)) => (* 3 3) 9 Return University of Virginia CS 200
Buffer University of Virginia CS 200
Lines of Code 2 With the Lazy Scheme evaluator, what does this expression evaluate to? ((lambda (x) (if #t 200 (x 100))) ((lambda (y) (lambda (z) (* y 2)) #f) #f)) University of Virginia CS 200
200 ((lambda (x) (if #t 200 (x 100))) ((lambda (y) (lambda (z) (* y 2)) #f) #f)) Bonus: what does it evaluate to with the standard applicative order evaluator? Lines of Code 2 Return University of Virginia CS 200
Buffer University of Virginia CS 200
Lines of Code 4 Name two programming languages that have latent, dynamic types. University of Virginia CS 200
Lines of Code 4 Scheme, PHP Return University of Virginia CS 200
Buffer University of Virginia CS 200
Lines of Code 10 • Order these by their size (smallest to biggest): A. Primosaic Code (PS5) B. Metacircular Evaluator Code (PS7) C. Fugu Fish Genome (100 bases = 1 loc) D. Human Genome (100 bases = 1 loc) E. F-22 Stealth Fighter Jet Avionics Software F. Windows XP G. US Tax Code (1 page = 60 loc) University of Virginia CS 200
Lines of Code 10 B. Metacircular Evaluator (244 loc) A. Primosaic Code (518 loc) G. US Tax Code (6000 pages ~ 360 000 loc) E. F-22 Stealth Fighter Jet Avionics Software (1.5M lines) C. Fugu Fish Genome (100 bases = 1 loc) (400M bases ~ 4M loc) D. Human Genome (3B bases ~ 30M loc) F. Windows XP (45M lines) Return University of Virginia CS 200
Buffer University of Virginia CS 200
History 1 Alan Perlis (first Turing award winner and author of the SICP preface) said: The best book on programming for the layman is “----- -- ----------”; but that’s because it's the best book on anything for the layman. Fill in the blank. His pen name was Lewis Carroll It was written by Charles Dodgson, a mathematician and logician at Oxford Hint University of Virginia CS 200
History 1 Alan Perlis (first Turing award winner and author of the SICP preface) said: The best book on programming for the layman is “Alice in Wonderland”; but that’s because it's the best book on anything for the layman. Return University of Virginia CS 200
Buffer University of Virginia CS 200
History 2 Charles Babbage was the Lucasian Chair of Mathematics at Cambridge University. Who is the current Lucasian Chair? University of Virginia CS 200
History 2 Stephen Hawking Others include Sir Isaac Newton, Paul Dirac, George Stokes Return University of Virginia CS 200
Buffer University of Virginia CS 200
Return History 4 Names Ada Lovelace Admiral Hopper Betty Holberton, etc. (FORMAC) Jean Sammet (COBOL) Admiral Grace Hopper Barbara Liskov Who of the following were women? • First Computer Scientist • Creator of first compiler • First 6 programmers of ENIAC • Designer of first language for symbolic mathematical computation • Originator of most widely-used language of 60s, 70s and 80s • Designer of first language to support data abstraction University of Virginia CS 200
History 4 Return University of Virginia CS 200
Buffer University of Virginia CS 200
History 10 Put these events in chronological order: A. Alan Turing publishes “On Computable Numbers” B. First Mechanical Adding Machine C. First Programmable Electronic Computer D. First Video Game E. LISP F. Scheme G. Smalltalk University of Virginia CS 200
History 10 B. First Mechanical Adding Machine 1642 (Blaise Pascal) A. Alan Turing publishes “On Computable Numbers” 1937 C. First Programmable Electronic Computer Collossus, 1943 E. LISP 1959 D. First Video Game 1962 G. Smalltalk 1972 F. Scheme 1975 Return University of Virginia CS 200
Buffer University of Virginia CS 200
Mostly Nematodes 1 What fraction of all animals in the world are Nematodes? University of Virginia CS 200
Mostly Nematodes 1 4/5ths 80% of all animals are Nematodes! http://elegans.swmed.edu/Nematodes/ Return University of Virginia CS 200
Buffer University of Virginia CS 200
Mostly Nematodes 2 How many cells are in an adult Nematode (Caenorhabditis elegans)? University of Virginia CS 200
Mostly Nematodes 2 959 (always exactly the same number) (~300 are neurons) Return University of Virginia CS 200
Buffer University of Virginia CS 200
Bonus Question How many cells die every second in an adult human? University of Virginia CS 200
50 Million (out of about 50 Trillion) Return University of Virginia CS 200
Buffer University of Virginia CS 200
Mostly Nematodes 4 Scheme was named after what two languages? University of Virginia CS 200
Mostly Nematodes 4 Planner and Conniver Return University of Virginia CS 200
Buffer University of Virginia CS 200
Mostly Nematodes 10 • What do the following acronyms stand for (sometimes a creative, incorrect answer is better than a dull correct answer): • cdr • LISP • NP • PHP (before 1995) • PHP (now) University of Virginia CS 200
Mostly Nematodes 10 • cdr • contents of the decrement register • LISP – LISt Processing • NP - Non-Deterministic Polynomial • PHP (before 1995) • Personal Home Page Tools • PHP (before 1995) • PHP: Hypertext Processor Return University of Virginia CS 200
Buffer University of Virginia CS 200
Too Trivial 1 When does the movie Enigma open in Charlottesville? University of Virginia CS 200
Too Trivial 1 May 24 (Vinegar Hill) Return University of Virginia CS 200
Buffer University of Virginia CS 200