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

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

View Full Document Right Arrow Icon
;; 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
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

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 Right Arrow Icon
Ask a homework question - tutors are online