""" CSCI150 function examples """ def interest_calculator(principal, rate_as_percent): """ Compute the amount of interest earned """ rate = rate_as_percent * 0.01 return principal * rate def dog_years(years): """ Convert from human years to dog years """ return years * 7 def dog_stats(dog_name, years): """ Print some information about a dog """ print(dog_name,"is the name of the dog") print(dog_name, "is", years, "years old") def advanced_dog_stats(dog_name, years): """ Print basic dog information and then age in dog years """ dog_stats(dog_name, years) print("In dog years that is " + str(dog_years(years)) + " years old")