CSci 150: Foundations of computer science
Home Syllabus Readings Projects Tests

printable version

Test 3 Review A

[1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15]

Problem R3a.1.

Complete the f function below so the below program, when executed, displays 4.0 7.0. (Do not modify anything except the body of f. There are many possible answers.)

def run():
    a = 16.0
    b = 49.0
    print('{0} {1}'.format(f(a), f(b)))

def f(x):
    # your solution here

run()