Logo

Python Questions Set 164:

Quiz Mode

Which module provides an interface to the built-in garbage collector?

Solution:

escape = "died and\\\b they lived happily ever after\r...."

print escape

Solution:

Which of the following is not a scripting language?

1
2
3
4

Solution:

Procedures or functions defined within an object are known as ______.

1
2
3
4

Solution:

What will be the output of the following Python expression if x=22.19?

print("%5.2f"%x)

1
2
3
4

Solution:

  Suppose t = (1, 2, 4, 3), which of the following is incorrect?
 

1
2
3
4

Solution:

How are static files managed in Django?

1
2
3
4

Solution:

What will be the value of following python code

i=1 while True: if i%3==0: break print(i) i + = 1

1
2
3
4

Solution:

Deduce the output of the following code:


x = 54

y = 54

z = 52

z += 2

print(id(x) == id(y))

print(id(x) == id(z))

1
2
3
4

Solution:

 

What Is The Output Of The Following Code Snippet?

def myfunc(text, num):
   while num > 0:
       print(text)
    num = num - 1

myfunc('Hello', 4)

1
2
3
4

Solution: