









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Notes; Class: Pattern Recog Using Hid Markov; Subject: Computer Sci & Software Engr; University: Rose-Hulman Institute of Technology; Term: Unknown 1989;
Typology: Study notes
1 / 15
This page cannot be seen from the preview
Don't miss anything!










def complain (complaint = 'This is a dead parrot' ): print "Customer:" , complaint complain() complain( "If you hadn't nailed 'im to the perch, he'd be pushin' up daisies!" ) def mutable_weirdness (n, l=[]): l.append(n) print l mutable_weirdness( 4 , [ 1 , 2 , 3 ]) mutable_weirdness( 1 ) mutable_weirdness( 2 )
def converse (complaint = 'Bereft of life, he rests in piece' , response = "He's pinnin' for the fjords" ): """Conducts a short conversation. Conducts a short conversation between a complaining customer and a shopkeeper. """ print "Customer:" , complaint print "Shopkeeper:" , response converse(response= "There, he moved!" ) help(converse) print converse.doc
import doctest
def average (values): _"""Computes the arithmetic mean of a list of numbers. >>> print average([1])
>>> print average([1,2])
>>> print average([1,2,3])
>>> print average([1,-2,3])
"""_ return sum(values, 0.0) / len(values) if name == 'main' :