# What will be the output of the following Python code x=[,] print(" ".join(list(map(str,x))))

1.   

2.   

3.  Syntax error

4.  [] []

4

 

Explanation :
No Explanation available for this question

# What will be the output of the following Python code a=165 b=sum(list(map(int,str(a)))) print(b)

1.  561

2.  5

3.  12

4.  Syntax error

4

12

Explanation :
No Explanation available for this question

# What will be the output of the following Python code a= [1, 2, 3, 4, 5] for i in range(1, 5): a[i-1] = a[i] for i in range(0, 5): print(a[i],end = " ")

1.  5 5 1 2 3

2.  5 1 2 3 4

3.  2 3 4 5 1

4.  2 3 4 5 5

4

2 3 4 5 5

Explanation :
No Explanation available for this question

# What will be the output of the following Python code def change(var, lst): var = 1 lst = 44 k = 3 a = [1, 2, 3] change(k, a) print(k) print(a)

1.  3[44, 2, 3]

2.  1[1,2,3]

3.  3[1,2,3]

4.  1[44,2,3]

4

3
[44, 2, 3]

Explanation :
No Explanation available for this question

# What will be the output of the following Python code a = [1, 5, 7, 9, 9, 1] b=a x= 0 for x in range(1, len(a)): if a[x] > b: b = a[x] b= x print(b)

1.  5

2.  3

3.  4

4.  0

4

4

Explanation :
No Explanation available for this question

# What will be the output of the following Python code a=["Apple","Ball","Cobra"] a.sort(key=len) print(a)

1.  [‘Apple’, ‘Ball’, ‘Cobra’]

2.  [‘Ball’, ‘Apple’, ‘Cobra’]

3.  [‘Cobra’, ‘Apple’, ‘Ball’]

4.  Invalid syntax for sort()

4

[‘Ball’, ‘Apple’, ‘Cobra’]

Explanation :
No Explanation available for this question

# What will be the output of the following Python code num = ['One', 'Two', 'Three'] for i, x in enumerate(num): print('{}: {}'.format(i, x),end=" ")

1.  1: 2: 3:

2.  Exception is thrown

3.  One Two Three

4.  0: One 1: Two 2: Three

4

0: One 1: Two 2: Three

Explanation :
No Explanation available for this question

# Which of these definitions correctly describes a module

1.  Denoted by triple quotes for providing the specification of certain program elements

2.  Design and implementation of specific functionality to be incorporated into a program

3.  Defines the specification of how it is to be used

4.  Any program that reuses code

4

Design and implementation of specific functionality to be incorporated into a program

Explanation :
No Explanation available for this question

# Which of the following is not an advantage of using modules

1.  Provides a means of reuse of program code

2.  Provides a means of dividing up tasks

3.  Provides a means of reducing the size of the program

4.  Provides a means of testing individual parts of the program

4

Provides a means of reducing the size of the program

Explanation :
No Explanation available for this question

1.  Client

2.  Docstring

3.  Interface

4.  Modularity

4