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

From 556 to 570 of 820

Q. 3 DATA TYPES

a. he

b. lo

c. olleh

d. hello

  • a. he

Q. Which of the following will run without errors?

a. round(45.8)

b. round(6352.898,2,5)

c. round()

d. round(7463.123,2,1)

  • a. round(45.8)

Q. What is the return type of function id?

a. int

b. float

c. bool

d. dict

  • a. int

Q. >>>x = 13 ? 2

a. x = 13 // 2

b. x = int(13 / 2)

c. x = 13 % 2

d. all of the mentioned

  • d. all of the mentioned

Q. >>>example("hello")

a. indentation error

b. cannot perform mathematical operation on strings

c. hello2

d. hello2hello2

  • a. indentation error

Q. , 23, 'hello', 1]

a. list

b. dictionary

c. array

d. tuple

  • a. list

Q. In order to store values in terms of key and value we use what core data type.

a. list

b. tuple

c. class

d. dictionary

  • d. dictionary

Q. Which of the following results in a SyntaxError?

a. ‘”once upon a time…”, she said.’

b. “he said, ‘yes!\” c) ‘3\\’

  • c. d) ”’that’s okay”’

Q. >>>average = (grade1 + grade2) / 2

a. 85.0

b. 85.1

c. 95.0

d. 95.1

  • a. 85.0

Q. What is the return value of trunc()?

a. int

b. bool

c. float

d. none

  • a. int

Q. What is the output of print 0.1 + 0.2 == 0.3?

a. true

b. false

c. machine dependent

d. error

  • b. false

Q. Which of the following is not a complex number?

a. k = 2 + 3j

b. k = complex(2, 3)

c. k = 2 + 3l

d. k = 2 + 3j

  • c. k = 2 + 3l

Q. What is the type of inf?

a. boolean

b. integer

c. float

d. complex

  • c. float

Q. What does ~4 evaluate to?

a. -5

b. -4

c. -3

d. +3

  • a. -5
Subscribe Now

Get All Updates & News