# # convert these functions to functions that get all of their input via # parameters and return the results (where appropriate) to the # caller. When you are done, there won't be any prompt for data from # inside a function, or any print statement # # written by e.bonakdarian march 2010 # # needs parameters and a return value def square(): # squares a number num = input('enter number to square: ') print 'the result is ', num * num # needs parameters and a return value def average2(): # average of two values num1 = input('enter number #1: ') num2 = input('enter number #2: ') avg =(num1 + num2) / 2.0 print 'average is: ', avg # needs parameters and a return value def fahr2cels(): # converts a fahrenheit temperature to celsius num = input('enter fahrenheit temperature: ') # code to convert fahrenheit to celsius # cels = ...? print 'the corresponding celsius valu is %.2f' % cels # you need to add your compute_BMI here and call it below def QuickTest(): # our simple test function -- you'll need to change this # to deal with functions that parameters and return values. square() average2() fahr2cels() if __name__ == '__main__': QuickTest() raw_input('\n to exit')