tutorial01

tutorial01 - CS 135 - Winter 2012 Tutorial the First...

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

View Full Document Right Arrow Icon

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

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

Unformatted text preview: CS 135 - Winter 2012 Tutorial the First January 11, 2012 CS 135 Winter 2012 01: Tutorial the First 1 Clicker Question - Design Recipe For the built-in function expt, which of the following is the best design recipe? A ;; expt: Num Num Num ;; Purpose: To raise a number to the power of another ;; Example: ( check-expect ( expt 1 1 ) 1 ) ;;[definition omitted] ;; Test: ( check-expect ( expt 1/2 3 ) 1/8 ) B ;; expt: Int Int Int ;; Purpose: To raise an integer to a power ;; Example: ( check-expect ( expt 1 1 ) 1 ) ;;[definition omitted] ;; Test: ( check-expect ( expt 2 4 ) 16 ) C ;; expt: Num Num Num ;; Purpose: To raise a real number to a power ;; Example: ( check-expect ( expt 1 1 ) 1 ) ;;[definition omitted] ;; Test: ( check-expect ( expt 2 4 ) 16 ) D ;; expt: Int Int Int ;; Purpose: To raise an integer to a power ;; Example: ( = ( expt 1 1 ) 1 ) ;;[definition omitted] ;; Test: ( check-expect ( expt 2 4 ) 16 ) E ;; Int Int Int ;; Purpose: To raise an integer to a power ;; Example:...
View Full Document

This note was uploaded on 04/02/2012 for the course CS 135 taught by Professor Vasiga during the Winter '07 term at Waterloo.

Page1 / 11

tutorial01 - CS 135 - Winter 2012 Tutorial the First...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online