''' Name: Email id: Purpose: develop programmer-defined functions ''' # function voting_age(): returns how old you need to be to vote; i.e. the # integer 18. # Olio is a module/library with these function definitions # voting_age, has_blanks, etc. In use_olio, we import module olio and then # have the ability to use functions from olio. def voting_age(): # This function has no parameters! When it's called, it hands back 18 age = 18 return age # function has_blanks( s ): returns a whether s contains at least one blank # character; i.e., returns True if s contains a blank, and returns # False otherwise. def has_blanks( s ): blank = ' ' if ( blank in s ): # We check if there's a blank (a space) in s return True # return True if there is a blank else: return False # Please be supperrrr careful when printing inside functions. # Usually we tell you exactly what we want and usually DON'T # print inside functions. Remember print() is not return. # function great_seal( ): prints the string 'E Pluribus Unum' def great_seal(): # This function also takes in no parameters # it simply prints the message when it's called. # No return statement! Return is NOT PRINT NOT PRINT NOT PRINT. # return is a value the function hands back upon invocation (doesn't print # unless you say print) # Print will print it to the console upon function invocation. message = 'E Pluribus Unum' print ( message ) # THIS FUNCTION RETURNS NONE by default. All functions without an # explicit return statement return None by default. (IMPORTANT) # All functions have a return value! (None or whatever you explicitly said to return) # function a_ing( n ) prints n lines of output. The first line prints a # single 'a', the second line prints 'aa', the third line prints 'aaa', # and so on. ...