# grades - The first three lines of this file were inserted...

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

;; The first three lines of this file were inserted by DrScheme. They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-beginner-reader.ss" "lang")((modname grades) (read-case-sensitive #t) (teachpacks ((lib "image.ss" "teachpack" "htdp"))) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ((lib "image.ss" "teachpack" "htdp"))))) ;; Ru Wang 20319247 CS 135 section 001 tut 108 ; ;; Question 4: Grades ; ;; Part a ; ;; Contract: ;; final-CS135-grade: num num num num num -> num ; ;; Purpose: Calculates the final grade from a list of participation grade, assignment grade, midterm1 grade, midterm2 grade and final exam grade. it also calculates if assignment average or weighted exam average is below 50 and returns the minimum of 46 and the 5 weighted grades. t ;; Examples: (final-CS135-grade 49 50 50 50 50) => 49.95 ;; (final-CS135-grade 100 100 49 49 49) => 46 ;; (final-CS135-grade 100 49 100 100 100) => 46 ;; (final-CS135-grade 20 20 20 20 20) => 20

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.

## This note was uploaded on 10/21/2010 for the course CS 135 taught by Professor Vasiga during the Fall '07 term at Waterloo.

### Page1 / 2

grades - The first three lines of this file were inserted...

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

View Full Document
Ask a homework question - tutors are online