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

From 691 to 705 of 820

Q. ^12

a. 2

b. 4

c. 8

d. 12

Q. R operator. Hence the output of the code shown above is: 20 10.

a. 1011011

b. 11010100

c. 11101011

d. 10110011

  • b. 11010100

Q. <20) and not(10>30)

a. true

b. false

c. error

d. no output

  • b. false

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
Subscribe Now

Get All Updates & News