Homework Assignment

Functions

Contents:


Overview

Topic: Functions
Related Reading: Chapter 5
Due:

Please make sure you adhere to the policies on academic integrity.


Problems to be Submitted (20 points)

  1. (5 points)

    Exercise 5.9 on page 196 of the book.

  2. (5 points)

    Exercise 5.23 on page 199 of the book.

  3. (5 points)

    Exercise 5.24 on page 199 of the book.

  4. (5 points)

    Exercise 5.29 on page 199 of the book.


Extra Credit

  1. (2 points)

    Do Exercise 5.14 on page 197 of the book, but write it as a function convertToBase(value, base) taking the original value (in decimal), and the desired base, and returning a string that represents the value converted to the given base. For example convertToBase(84, 5) should return string '314'.


Last modified: Monday, 22 February 2010