Logo

Python Questions Set 17:

Quiz Mode

  print(0xA + 0xB + 0xC): 

1
2
3
4

Solution:

  Which of the following mode will refer to binary data? 

1
2
3
4

Solution:

Suppose listExample is [‘h’,’e’,’l’,’l’,’o’], what is len(listExample)? 

1
2
3
4

Solution:

 

What data type is the object below?

L = [1, 23, 'hello', 1]

1
2
3
4

Solution:

How many CPUs can the Python threading library take advantage of simultaneously?

1
2
3
4

Solution:

What is function of break ?

1
2
3
4

Solution:

What will be the output of the following Python code snippet?

a={1:"A",2:"B",3:"C"}
for i,j in a.items():
   print(i,j,end=" ")

1
2
3
4

Solution:

 What will be the output shape of the following Python code? 

 

import turtle
t=turtle.Pen()
for i in range(1,4):
t.forward(60)
t.left(90)

1
2
3
4

Solution:

What is the output of the given code?


def myfunc(a):

    

    

    

    a=[2,4,5]


list=[11,23,45,67,78]

myfunc(list)

print(list)

1
2
3
4

Solution:

What happens if the base condition isn’t defined in recursive programs? 

1
2
3
4

Solution: