Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. What is the output of the following program? 1 def main: 2 x=1 3 y 3.4 4 prin

ID: 3733732 • Letter: 1

Question

1. What is the output of the following program? 1 def main: 2 x=1 3 y 3.4 4 print(Before:", X,N", y) 5 change us(x, y) 6 print('inAfter: , x,'t, y) 7 def change _us(a, b): Your answer: a=0 9 b-0 10 print(InNow: a 11 main0 a,'itb ', b) 2. What is the output of the following program? 1 def main: 2 print(The answer is: 'one_of three(3,6,-5) Your answer 3 def one_of two(x, y ): return x 6 return y 7 def one_of three( x, y, z): 8 return one_of two( x, one_of two(y, z)) 9 main0 3. What is the output of the following program if the input is 60? 1 def mainO: 2 num = int(input('Enter an integer: ')) 3 print('The answers of', num, 'are: In) 4 facts(num) Your answer:

Explanation / Answer

The output for the above codes:

1.

Before : 1 3.4

Now : a = 0 b = 0

After : 1 3.4

2.

The answer is : 6