# Assignment 1 - CMPSC 461: Fall 2008: Assignment 1 Due...

This preview shows pages 1–2. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CMPSC 461: Fall 2008: Assignment 1 Due September 17, 2008 Generally speaking, assignments for this course will involve some programming and some prose-writing (in some cases the prose-writing will be replaced by quizzes on Angel). The code for the i-th assignment should be written in a single file titled <id>_i.ss , where id is your Angel username; similarly, the part in English should be in a file <id>_i.pdf or <id>_i.doc . For example, if your Angel username is szc11 and you are submitting the first assignment, then all your Scheme code should be in the file szc11_1.ss , and the non-code part should be in a file szc11_1.doc or szc11_1.pdf . To move on to the first assignment. Yes, it is about Scheme. Most of it is programming; there are a few questions you have to answer in English. We use the dialect of Scheme defined in our textbookEssentials of Programming Languages (3rd ed.) you can select it from the language tab in the bottom left hand corner in PLT Scheme. Most of the assignment is doable using the constructs of Scheme that we discussed in class, but you may in some cases need to refer to a Scheme textbook/manual. Have fun! 1. Write a function prob-1 that, given a natural number n , determines the sum n X i =1 i ! where i ! denotes the factorial of i . [10 points] 2. Look at the C/Java function below. What does this function do? Write a Scheme function prob-2 that achieves the same goal. [10 points] int foo(int n) { int c = 1, d = 1; for (c = 1; c <= n; c++) { d = d * c; c ++; } return d; } [Extra credit] Now look at the function below. What doesNow look at the function below....
View Full Document

## This note was uploaded on 09/30/2008 for the course CMPSC 461 taught by Professor Chaudhuri during the Fall '08 term at Pennsylvania State University, University Park.

### Page1 / 3

Assignment 1 - CMPSC 461: Fall 2008: Assignment 1 Due...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online