x 120 y 4 print s xy print s s y x int yx def my funct

x = 12.0 y = 4 print (*/\\/]%s % (x/y)) print (*%s - % s\" % (y, x, int (y/x))) def my_ function (x, y-1ist-[]); for i in range(x); my_list.append(1*1) print (my_list) my_function(1) my_function(2m, [5, 5]) my_function(2) Circle each statement below which is true. I. when a function is called, copies of all the argument objects are made. II. Assignments to a parameter name inside a function may affect the code outside the function. III. a function may return multiple objects IV. Whenever a function is called, a local namespace is created for that function. def f(a-[], b = [3]); a. append (b) return a a - f() a - f() f(a)) print (a) Circle all of the following statements which are true: a. 15 \'15\' b. -35 si -35 c. -5 is -5 d. -25 is \'-25\'

Solution

1)

first 3.5 and 0 comes as the output.

2)

[0]
[5, 5, 0, 1]
[0, 0, 1]

3)In this code print could not have two arguments so I have deleted \" end=\' \' \" from both the print statements.

1
?
True
3
?
True
5
?
True
7
?
True

4)

Statements iii and iv are true about functions.

5)([[3], [3], [3]], [[3], [3], [3]])

6)b and c are true statements in python script.

 x = 12.0 y = 4 print (*/\\/]%s % (x/y)) print (*%s - % s\

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site