Assignment 21 – function implementation

Due Wednesday, March 27


Module hodge.py

Function sample( d )

-8268.3982 * log( d )

Because the age is an estimate, it is always truncated to integer. For your information, the math.log() function should prove useful.

sample( 0.35 ) = 8680

sample( 0.005 ) = 43808

sample( 1.0 ) = 0


Function has_vowel( w )

has_vowel( oxen ) = True

has_vowel( urchin ) = True

has_vowel( mink ) = True

has_vowel( rabbit ) = True

has_vowel( lynx ) = False