Fundamentals of Computer Science

CS 2500, Spring 2014

  • Homepage
  • General
  • Texts
  • Syllabus
  • Assignments
  • Labs
  • Blog
  • Advice



Important Messages




Apr. 15, 2014

Exam 3 graded

You can pick up your exam from Prof. Razzaq's office today between 2pm and 3pm or tomorrow between 10am and 12pm. The median grade was 77%, mean 76%.



Apr. 13, 2014

Exam Review Notes

Notes from the review session can be found here.



Apr. 11, 2014

Exam Review

The review session for exam 3 will be this Sunday 2-4pm in 210WVH.



Apr. 11, 2014

Leafy Trees

A solution to all-leafy-trees has been going around that is very wrong. Unfortunately, this solution was assumed to be correct by course staff during office hours. The solution assumed that, given all BT's of height n-1, to generate all BT's of height n, all one had to do was "triple" the list of BT's of height n-1 in the following manner for each BT of height n-1 t:

(make-node t 'leaf)
(make-node 'leaf t)
(make-node t t)

This is, however, very wrong. Under these methods, it would be impossible to ever generate this BT, which has height 3:

(make-node
    (make-node 'leaf
      (make-node 'leaf 'leaf))
    (make-node 'leaf 'leaf)))

If a staff member guided you to this solution, he or she thoroughly apologizes.

A good resource to check your function against is: here . This will not tell you how to write your function, but the length of the results of your function should match. Had the tutor who began this falsehood simply written better tests this never would have happened.



Apr. 9, 2014

Code from Ahmed lecture, Trace evaluations

Here is code from today's final lecture of the semester.

Remember to fill out Trace Evaluations.

It's been a great semester! Good luck on the exam!



Apr. 9, 2014

Code from Ahmed lecture

Here is code from today's lecture.



Apr. 9, 2014

Sample Exam 3 Questions

Here are some sample exam questions.



Apr. 8, 2014

Code from Ahmed lecture

Here is code from the lecture on April 3rd. Here is code from yesterday's lecture.



Apr. 8, 2014

Pedro's Office Hours

Pedro's office hours are moving to Thurs. 4-6pm for this week.



Apr. 7, 2014

Razzaq's Office Hours

My office hours are moving to Thurs. 12-2pm for this week.



Apr. 2, 2014

Code from Ahmed lecture

Here is code from today's lecture.



Mar. 31, 2014

Code from Ahmed lecture

Here is code from today's lecture.



Mar. 30, 2014

Typo in Problem Set 11

Please ignore Problem 7 since it's the same as Problem 4.



Mar. 28, 2014

Style and Problem Set 11

Here is a reminder about the style guidelines for designing programs. It's worth your while to make sure your PS 11 adheres to these guidelines. We'll be checking!



Mar. 27, 2014

Code from Ahmed lecture

Here is code from today's lecture.



Mar. 26, 2014

Problem Set 11, Problem 9

For Problem 9, count does not matter. For instance, '(1 2 3 (3)) and '(2 3 1 1) do contain the same atoms.



Mar. 26, 2014

Code from Ahmed lecture

Here is code from Monday's lecture and code from today's lecture.



Mar. 25, 2014

Matt and Sinan's Office hours

Matt's office hours on Thurs. 7-9pm and Sinan's hours on Tuesday 4-6pm are cancelled this week.



Mar. 25, 2014

Code from Razzaq lecture

Here is the code from Monday's lecture.



Mar. 21, 2014

Correction in Problem Set 10

Problem 1c should read "Write down the data definition for a UOP ..." and not
"Write down the parametric data definition for a UOP ..."



Mar. 20, 2014

Code from Ahmed lecture

Here is code from today's lecture.



Mar. 19, 2014

Code from Ahmed lecture

Here is code from today's lecture.



Mar. 19, 2014

Code from Review Session

Here is code from last night's review session in 101 CH and code from last night's review session in 103 CH.



Mar. 18, 2014

Exam Review Session

The exam review session is tonight, Mar 18, 7-9pm. .

We have two rooms reserved.

  • Go to 101 CH if your last initial is A-L
  • Go to 103 CH if your last initial is M-Z



Mar. 18, 2014

Code from Ahmed lecture

Here is code from yesterday's lecture.



Mar. 13, 2014

Code from Ahmed lecture

Code from today's lecture is here and here.



Mar. 13, 2014

Exam 2 Sample Exam

Exam 2 is on Thursday, Mar. 20, 6-8pm in 168 SN for both sections. There will be an exam review on Tuesday, Mar. 18 from 7-9pm, rooms to be determined.

Here is an old exam you can use to study. Keep in mind that this was a 65 minute exam, so the exam on Thursday will be slightly longer.



Mar. 12, 2014

Code from Ahmed lecture

Here is code from today's lecture.

Here is an interface for sets. Assuming the data definition for sets that's included in this file (which represents sets using lists with duplicates allowed), design the functions listed in the file.



Mar. 3, 2014

Code from Ahmed lecture

Here is code from last Thursday's lecture (Feb 27).



Feb. 26, 2014

Code from Ahmed lecture

Code from the last three lectures is here, here, and here.



Feb. 25, 2014

Date change for Exam 2

The date for Exam 2 is changed to Thursday, March 20, time is still 6-8pm.



Feb. 21, 2014

Hints for Missile Defense

Here are some hints about velocity that you will find useful for Missile Defense.

  • Some students have had questions about what it means to represent velocity as a
    (make-posn Number Number). Here is an interpretation:
    A velocity (make-posn dx dy) means that after one clock tick, assuming no collisions, the sprite will have moved by dx pixels on the x-axis and by dy pixels on the y-axis. In other words, if the position of a sprite is (make-posn x y) and the sprite's velocity is (make-posn dx dy), that means that after one clock tick, we expect the sprite to be at position (make-posn (+ x dx) (+ y dy)).
  • Here's how to calculate velocity when you generate a new sprite (missile or bullet):
    For a sprite that is going from coordinate (fx,fy) to coordinate (tx,ty) at a speed of n pixels per clock tick (where n is a Number), if d is the distance between points (fx,fy) and (tx,ty), the velocity can be calculated using the following formula:
    (make-posn (* (- tx fx) (/ n d)) (* (- ty fy) (/ n d))).
    Recall that the assignment already tells you how to calculate the distance between two points.



Feb. 17, 2014

Office hour change: Pedro

Pedro's office hours are changed to Friday, 9:30-11:30am for this week only.



Feb. 17, 2014

Office hour change: Alex

Alex Jolly's office hours have been changed to Friday, 4-6pm for the rest of the semester.



Feb. 13, 2014

Snake code from Ahmed lecture

Here is the latest code for the Snake game. Try to finish the game on your own. Design and test eat&grow next. I've added a simple world->world function (see comments in code) which you'll have to modify to handle eating. After that, the main work left is in designing the key-handler and the collision detection and game-over? functions.



Feb. 12, 2014

Code from Ahmed lecture

Here is code for the Snake game from today's lecture.



Feb. 10, 2014

Code from Ahmed lecture

Here is code for the Snake game from today's lecture.



Feb. 6, 2014

Homework Partners

Because lab was cancelled yesterday, the next partner switch will take place in lab next week. You should work on Problem Set 5 with your current partner.



Feb. 6, 2014

Code from Razzaq lecture

Here is the phone book code from today's lecture: phone-book.rkt



Feb. 6, 2014

Code from Ahmed lecture

Here is code from today's lecture.



Feb. 4, 2014

Code from review session

One of the leader's of the review session sent in the code from the review session for your perusal: testprep1.rkt



Feb. 3, 2014

Homework 1

If you weren't in lab to pick up homework 1, you can pick them up from William during his office hours, or you can try stopping by WVH 330 and hope he's there.



Feb. 3, 2014

Code from Ahmed lecture

Here is code from today's lecture.



Feb. 3, 2014

Exam review session tonight

The exam review session is tonight, Feb 3, 7-9pm. We have two rooms reserved.

  • Go to 135 SH if your last initial is A-M
  • Go to 335 SH if your last initial is N-Z



Jan. 31, 2014

Test coverage checking disabled on handin server

Due to some confusion about the handin server's warning regarding test cases, the handin server will no longer warn you if there are untested parts of your code. You should run the code and DrRacket, and check that there are no (or very few) black highlighted chunks of code.



Jan. 31, 2014

Exam 1 and Review Session

Exam 1 is on Thursday, Feb 6, 6-8pm in 200 Richards for both sections. There will be an exam review on Monday, Feb 3 from 7-9pm, room to be determined.

Here is an old exam you can use to study. Keep in mind that this was a 65 minute exam, so the exam on Thursday will be slightly longer.

Here is an ISL Template Quiz Generator that you can also use to study. Choose Intermediate Student Language in DrRacket, then copy and paste into DrRacket and click Run and evaluate (generate-quiz n) for any natural number n.



Jan. 29, 2014

Code from Ahmed lecture

Here is code from today's lecture.



Jan. 29, 2014

Prof. Ahmed's office hours

Starting tomorrow, Prof. Ahmed will hold office hours on Thursdays from 1:30pm to 2:30pm to avoid a conflict with weekly faculty meetings.



Jan. 29, 2014

Code for Stop-and-Go

You can find the code for the Stop-and-Go game here



Jan. 28, 2014

William Bowman's office hours moved

Due to excessive demand and insufficient space, William Bowman's office hours have moved to the 3rd floor space near 366 WVH.



Jan. 27, 2014

Code from Prof. Ahmed's lecture

Here is the horsecart animation redone following the design recipe and here is code from today's lecture.



Jan. 17, 2014

Office hours change on Tuesday, 1/21/14

William Bowman will be out of town, so Alex Jolly will be holding additional office hours in 102. Many thank Alex!



Jan. 17, 2014

Room change for 1/23/14

We will have a combined lecture for both sections of CS2500 in 101 Churchill Hall at 10:30am on Thursday, 1/23/14. Make sure to go there instead of 105 or 305 Shillman.



Jan. 17, 2014

Change to Problem Set 2

Problem 4 is now marked as extra credit, so it is optional.



Jan. 6, 2014

Lab sections will begin Wed, Jan. 15

You must register for a lab section (CS 2501) Be sure to print and sign the Course Contract and bring it to your first lab session.



Jan. 6, 2014

Welcome!

Welcome to the CS 2500 blog.

You should check this blog on a daily basis, as we will use it to publish information to the class that needs to be disseminated in a timely way. For example, if we make a mistake on a homework assignment, or decide to issue an extension on a homework due date, you'd probably want to know about it immediately—and here is where we'll post the news.