Assignment 22 – function implementation

Due Tuesday, October 29


Task


Module hodge.py

-8268.3982 * log( d )

Because the age is an estimate, it is always truncated to integer. I suspect the built-in int() and the math.log() functions should prove useful.

sample( 0.35 ) = 8680

sample( 0.005 ) = 43808

sample( 1.0 ) = 0


has_vowel( oxen ) = True

has_vowel( urchin ) = True

has_vowel( mink ) = True

has_vowel( rabbit ) = True

has_vowel( lynx ) = False

 


 

 

 
   
   
   
 
  © 2019 Jim Cohoon   Resources from previous semesters are available.