Top 1000+ Solved Problem Solving and Python Programming MCQ Questions Answer

From 331 to 345 of 820

Q. :]: print(i, end = " ")

a. a a a a a a

b. a

c. no output

d. error

  • c. no output

Q. ): print(i)

a. 0

b. no output

c. error

d. none of the mentioned

  • b. no output

Q. 0): print(i)

a. 0.0 1.0

b. 0 1

c. error

d. none of the mentioned

  • c. error

Q. 0)): print(i)

a. 0.0 1.0

b. 0 1

c. error

d. none of the mentioned

  • b. 0 1

Q. ] in a: print(a[0])

a. 0 1 2 3

b. 0 1 2 2

c. 3 3 3 3

d. error

  • a. 0 1 2 3

Q. >>>"a"+"bc"

a. a

b. bc

c. bca

d. abc

  • d. abc

Q. >>>"abcd"[2:]

a. a

b. ab

c. cd

d. dc

  • c. cd

Q. >>> str1[-1:]

a. olleh

b. hello

c. h

d. o

Q. What arithmetic operators cannot be used with strings?

a. +

b. *

c. –

d. all of the mentioned

  • c. –

Q. >>>print (r"\nhello")

a. a new line and hello

b. \\nhello

c. the letter r and then hello

d. error

  • b. \\nhello

Q. >>>print('new' 'line')

a. error

b. output equivalent to print ‘new\\nline’

c. newline

d. new line

  • c. newline

Q. >>>str1[::-1]

a. dlrowolleh

b. hello

c. world

d. helloworld

  • a. dlrowolleh

Q. xA + 0xB + 0xC)

a. 0xa0xb0xc

b. error

c. 0x22

d. 33

  • d. 33

Q. >>>print "%d %d" % (obj.o1, obj.o2)

a. none none

b. none 22

c. 22 none

d. error is generated

  • d. error is generated

Q. >>>print(temp.id)

a. 224

b. error

c. 12

d. none

  • c. 12
Subscribe Now

Get All Updates & News