CIS 120 Programming Languages and Techniques
Final Exam, May 3, 2011
Name:
Pennkey:
My signature below certies that I have complied with the University of Pennsylvanias Code
of Academic Integrity in c
CIS 160 - Fall 2012
(instructor Val Tannen)
Homework 3 ANSWERS
Posted October 17
Problem 1 (20pts)
(a) How many ways are there to place m distinguishable objects into n distinguishable bins?
Each obje
Name:
CIS 120e Midterm I
October 15, 2010
1
/18
2
/12
3
/12
4
/16
5
/12
6
/08
7
/22
Total
/100
Do not begin the exam until you are told to do so.
You have 50 minutes to complete the exam.
There are
Name:
CIS 120 Midterm I
February 18, 2011
1
/10
2
/12
3
/6
4
/12
6
/10
Total
/50
Do not begin the exam until you are told to do so.
You have 50 minutes to complete the exam.
There are 50 total poin
Name:
CIS 120e Midterm I Review
This is a review for the midterm. These problems are intended to
be indicative of the kind that might appear on the exam, though you
should, of course, expect variatio
Name:
CIS 120e Midterm I
October 15, 2010
1
/18
2
/12
3
/12
4
/16
5
/12
6
/08
7
/22
Total
/100
Do not begin the exam until you are told to do so.
You have 50 minutes to complete the exam.
There are
Name:
CIS 120e Midterm I Review
This is a review for the midterm. These problems are intended to
be indicative of the kind that might appear on the exam, though you
should, of course, expect variatio
CIS 120 Programming Languages and Techniques
Midterm II
November 12, 2010
Answer key
1. (14 points) Pages 7 to 9 dene a simplied version of the Java Collection interface (the
SimpleCollection and Simp
CIS 120 Programming Languages and Techniques
Final
December 16, 2010
Name:
Pennkey:
Scores:
1
2
3
4
5
6
7
8
Total (120 max)
OCaml
1. (14 points) Recall the fold and member functions that we saw in the
CIS 120 Programming Languages and Techniques
Final
December 16, 2010
Answer key
OCaml
1. (14 points) Recall the fold and member functions that we saw in the OCaml part of the course:
let rec fold (c:a
CIS 120 Programming Languages and Techniques
Midterm II
November 12, 2010
Name:
Pennkey:
Scores:
1
2
3
4
5
6
Total (50 max)
1. (14 points) Pages 7 to 9 dene a simplied version of the Java Collection i
Name:
CIS 120 Midterm I Review
This is a review for the midterm. These problems are intended to
be indicative of the kind that might appear on the exam, though you
should, of course, expect variation
Name:
Pennkey:
CIS 120 Midterm I
October 12, 2011
1
/25
2
/20
3
/10
4
/25
5
/20
Total
/100
Do not begin the exam until you are told to do so.
You have 50 minutes to complete the exam.
There are 100
CIS 160 - Fall 2012
(instructor Val Tannen)
Midterm 1 SOLUTIONS
Posted Tuesday October 2, 2012
1. (25 pts) For each statement below, decide whether it is true or false. In each case attach a very brie
CIS 160 - Fall 2012
(instructor Val Tannen)
Homework 2 ANSWERS
Posted Friday, September 28
Problem 1 (20pts)
(a) Give an example of nite sets X, Y and functions f : X Y and g : Y X such that
g f is a
CIS 160 - Fall 2012
(instructor Val Tannen)
Homework 1 ANSWERS
Posted Tuesday, September 25
Problem 1 (20pts)
(a) Let A, B, C, D be arbitrary sets. Prove that (A C) (B D) (A B) (C D).
Answer
Let x (A
CIS 160 - Fall 2012
(instructor Val Tannen)
Final Exam SOLUTIONS
Posted Friday December 14, 2012
1. (45 pts) For each statement below, decide whether it is true or false. In each case attach a very br
CIS 160 - Fall 2012
(instructor Val Tannen)
Homework 5 ANSWERS
Posted November 13
Problem 1 (20pts) Alice is playing Solitaire Dice. The game uses two regular and fair dice,
that is, each die has 6 fa
CIS 160 - Fall 2012
(instructor Val Tannen)
Mock Final SOLUTIONS
Posted Sunday December 9, 2012
1. (50 pts) For each statement below, decide whether it is true or false. In each case attach a very bri
CIS 160 - Fall 2012
(instructor Val Tannen)
Mock Midterm 1 SOLUTIONS
Posted Saturday September 29, 2012
1. (30 pts) For each statement below, decide whether it is true or false. In each case attach a
CIS 160 - Fall 2012
(instructor Val Tannen)
Mock Midterm 3 SOLUTIONS (CORRECTED!)
Posted Monday December 3, 2012
1. (30 pts) For each statement below, decide whether it is true or false. In each case
CIS 160 - Fall 2012
(instructor Val Tannen)
Homework 6 ANSWERS
Posted November 20
Problem 1 (25pts)
follows.
base case
Consider the set PP of pairs of natural numbers recursively dened as
(0, 0) PP
co
CIS 160 - Fall 2012
(instructor Val Tannen)
Midterm 3 SOLUTIONS
Posted Tuesday December 4, 2012
1. (30 pts) For each statement below, decide whether it is true or false. In each case attach a very bri
CIS 160 - Fall 2012
(instructor Val Tannen)
Midterm 2 SOLUTIONS
Posted Thursday November 1, 2012
1. (30 pts) For each statement below, decide whether it is true or false. In each case attach a very br