Logo

Python Questions Set 163:

Quiz Mode

In python _______ datatype can be used instead of arrays.

Solution:

What are the main uses of Python?

1
2
3
4

Solution:

What to do if we want to add 'n' blank space after a string?

1
2
3
4

Solution:

What is the output of the given code?


string="Abekus"

print(string)

string[2]="p"

print(string)

1
2
3

Solution:

 Which of the following functions does not necessarily accept only iterables as arguments?
 

1
2
3
4

Solution:

 

What will be the output of the following Python code?

  1. >>>t1 = (1, 2, 4, 3)
  2. >>>t2 = (1, 2, 3, 4)
  3. >>>t1 < t2

1
2
3
4

Solution:

Suppose d = {“john”:40, “peter”:45}. To obtain the number of entries in dictionary which command do we use? 

1
2
3
4

Solution:

What will be the output of the following code?

print("Hello {name1} and {name2}".format('foo', 'bin'))

1
2
3
4

Solution:

What is the output of the code?

 

x=3.3456789
'%f | %e | %g' %(x, x, x)

1
2
3

Solution:

Which of the following statements is true about the Python function f = open('filename.txt', 'r+')?

1
2
3

Solution: