Logo

Python Questions Set 25:

Quiz Mode

What will the code print?

print(chr(ord('a')+2))

1
2
3
4

Solution:

Find the output of the following code:


x="Helloworld"

x.replace('l','L')

print(x)

Solution:

 

What will be the output of the following Python functions?


 x=3 

eval('x^2') 

1
2
3
4

Solution:

 Which function overloads the >> operator? 

1
2
3
4

Solution:

What does print(Test.__name__) display (assuming Test is the name of the class)?

1
2
3
4

Solution:

  The command used to set only the x coordinate of the turtle at 45 units is: 

1
2
3
4

Solution:

What is the output of the given code?


s="D:\\Abekus\\Python"

print(s)

1
2
3

Solution:

 The assignment of more than one function to a particular operator is _______
 

1
2
3
4

Solution:

Django is a framework that allows you to build large projects. On the other hand, Flask is used to build smaller websites.

1
2
3
4

Solution:

What will be the output of the following Python code?

class Demo:
def __init__(self):
self.a = 1
self.__b = 1
def get(self):
return self.__b
obj = Demo()
obj.a = 45
print(obj.a)

1
2
3
4

Solution: