231). Which of the following statement prints hello\example\test.txt?
>>>print(chr(ord('b')+1))

[A]print(“hello\example\test.txt”)
[B]print(“hello\\example\\test.txt”)
[C]print(“hello\”example\”test.txt”)
[D]print(“hello”\example”\test.txt”)

Show Answer

235). What will be the output of the following Python code?
>>>print("D", end = ' ')
>>>print("C", end = ' ')
>>>print("B", end = ' ')
>>>print("A", end = ' ')

[A]DCBA
[B]A, B, C, D
[C]D C B A
[D]D, C, B, A will be displayed on four lines

Show Answer

236). What will be the output of the following Python statement?(python 3.xx)
>>>print(format("Welcome", "10s"), end = '#')
>>>print(format(111, "4d"), end = '#')
>>>print(format(924.656, "3.2f"))

[A]Welcome# 111#924.66
[B]Welcome#111#924.66
[C]Welcome#111#.66
[D]Welcome # 111#924.66

Show Answer

237). What will be displayed by print(ord(‘b’) – ord(‘a’))?
>>>print(format("Welcome", "10s"), end = '#')
>>>print(format(111, "4d"), end = '#')
>>>print(format(924.656, "3.2f"))

[A]0
[B]1
[C]-1
[D]2

Show Answer

238). Say s=”hello” what will be the return value of type(s)?
>>>print(format("Welcome", "10s"), end = '#')
>>>print(format(111, "4d"), end = '#')
>>>print(format(924.656, "3.2f"))

[A]int
[B]bool
[C]str
[D]String

Show Answer