{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

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

Info icon This preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
CS 135 - Winter 2012 Tutorial the First January 11, 2012 CS 135 Winter 2012 01: Tutorial the First 1
Image of page 1

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

View Full Document Right Arrow Icon
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: ( check-expect ( expt 1 1 ) 1 ) ;; Definition: (omitted) ;; Test: ( check-expect ( expt 2 4 ) 16 ) CS 135 Winter 2012 01: Tutorial the First 2
Image of page 2
Group Problem - Design Recipe Write the design recipe for the following function. The function should be
Image of page 3

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

View Full Document Right Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern