Computing 3 Exercises
Computing 3 Exercises
a = 1
b = 2
print(foo(a, b))
print(a)
a = 1
b = 2
print(foo(a, b))
print(a)
13.Consider the following code with line numbers shown:
5 a = 5.5
6 b = 12
7 a = mangle(b, a)
8 b = mangle(a, b)
9 a = mangle(mangle(a,25), mangle(b,25))
3 a = 13
4 b = 72
5 a = mangle(b, a)
6 b = mangle(a, b)
7 a = mangle(mangle(a,32), mangle(b,32))
Trace the execution of this code and show the values of the variables after each of
lines 5, 6, 7, 8, and 9 have executed:
Line a b
5
6
7
8
9
Updated table to reflect updated code
Line a b
3
4
5
6
7