0% found this document useful (0 votes)
13 views3 pages

Answers Working With Functions

working with function answers

Uploaded by

Priya Sohal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views3 pages

Answers Working With Functions

working with function answers

Uploaded by

Priya Sohal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Answers of Functions

3) first of all in calling & function statement name is not same so, it will throw error

If this error is not there then answer will be “Output is 190”

4) 5#8#5#4#

5) 300@200

300@100

120@100

300@120

6) X = 25

X = 20

7) Ans C is correct

8) 22#40#9#13#

9) (22,44,66)

10) 105 # 6 #

11) def Sum3(L):

sum = 0;

for i in L:

if i % 3 == 0 :

sum = sum+i // sum+=i

print(“sum of integers ending with 3 in list =”,sum)

L = eval(input(“Enter list”))

Sum3(L)

12) def INDEX_LIST(L):

indexList = []

for i in L :

if L[i] != 0 :

indexList’.append(i)

return indexList

L = eval(input(“Enter list”))

INDEX_LIST(L)
13) Both a & c

14) option D is correct

15) option A

16) None as there is no return statement in the function

17) 250 300

18) 50#5

19) 5#8#5#4#

20) 3 5 5

23) fUN#pYTHONn#.

24) def LShift(Arr,n):

l = len(Arr)

for i in range(0,n) :

y = Arr[0]

for j in range(0,l-1):

Arr[j] = Arr[j+1]

Arr[l-1] = y

print(Arr)

Arr = [10,20,30,40,50,60]

LShift(Arr,2)

25) Answer is C 12#15%

26) Answer is b , Here keyword argument means argument with default value

27) SCHOOLbbbbCOM

28) 250 # 150

250 # 100

130 # 100

30) 15
32)

33)

34) hint if iterate list if first index have M

35) hint if i%10 == 5 so, any no is divided by 5 or 3 if on dividing with 10 it gives the same reminder

36)

41)

42) 20 #36#27#100#

You might also like