''' Purpose: Introduce user defined functions ''' def wahoo(): ''' Prints the string Wahoo-wa!!! ''' #return 'Jessica' #once python hits this the function is over print( "Wahoo-wa!!!" ) # If there is no return statement here so default return value is None #return 'Tierney' # If we put a return statement the function hands back the value after # the keyword return def wahoos( occurrences ): ''' This is a doc string. This function executes wahoo() occurrences times. ''' #print (occurrences) for occurrence in range(0, occurrences): #print( 'Wahoo-wa' ) wahoo() def year_founded(): ''' Returns the year UVA was founded ''' return 1819 def clas_credits_to_go(c): ''' Returns the number of credits needed to graduate based on c ''' CLAS_CREDIT_REQUIREMENT = 120 needed = CLAS_CREDIT_REQUIREMENT - c return needed #print( 'Quinn' ) # This will run with import of uva.py if not in a function