Python Practice Test MCQ Certified Go from 0 to Expert hero Set 6

What will be the value of the following Python expression?


Options are :

  • 4
  • 7
  • 2
  • 0

Answer :7

Evaluate the expression given below if A = 16 and B = 15


Options are :

  • 0.0
  • 0
  • 1.0
  • 1

Answer :0

Python Practice Test MCQ Certified Go from 0 to Expert hero Set 18

Which of the following operators has its associativity from right to left?


Options are :

  • +
  • \\
  • %
  • **

Answer :**

What will be the value of x in the following Python expression?


Options are :

  • 43
  • 44
  • 22
  • 23

Answer :44

What is the value of the following expression?


Options are :

  • (6.0, 16.0)
  • (6.00, 16.00)
  • (6, 16)
  • (6.00, 16.0)

Answer :(6.0, 16.0)

Python Certification Exam Preparation Set 16

Which of the following is the truncation division operator?


Options are :

  • /
  • %
  • //
  • |

Answer ://

What are the values of the following Python expressions?


Options are :

  • 64, 512, 64
  • 64, 64, 64
  • 512, 512, 512
  • 512, 64, 512

Answer :512, 64, 512

What is the value of the following expression?


Options are :

  • (1.0, 4.0)
  • (1.0, 1.0)
  • (4.0. 1.0)
  • (4.0, 4.0)

Answer :(1.0, 4.0)

Python Certification Exam Preparation Set 26

What is the value of the following expression?


Options are :

  • 8
  • 8.0
  • 8.3
  • 8.33

Answer :8.0

What will be the output of the following Python expression?


Options are :

  • Error
  • 1.0
  • 1.00
  • 1

Answer :1.0

What will be the value of X in the following Python expression?


Options are :

  • 30.0
  • 30.8
  • 28.4
  • 27.2

Answer :27.2

Python Certification Exam Preparation Set 8

Which of the following expressions involves coercion when evaluated in Python?


Options are :

  • 4.7 1.5
  • 7.9 * 6.3
  • 1.7 % 2
  • 3.4 + 4.6

Answer :1.7 % 2

What will be the output of the following Python expression?


Options are :

  • (1,3)
  • (0,3)
  • (1,0)
  • (3,1)

Answer :(1,3)

Which among the following list of operators has the highest precedence?


Options are :

  • <<, >>
  • **
  • |
  • %

Answer :**

Python Certification Exam Preparation Set 45

What will be the value of the following Python expression?


Options are :

  • 5.0
  • 5
  • 4.0
  • 4

Answer :4.0

Which of the following expressions is an example of type conversion?


Options are :

  • 4.0 + float(3)
  • 5.3 + 6.3
  • 5.0 + 3
  • 3 + 7

Answer :4.0 + float(3)

Which of the following expressions results in an error?


Options are :

  • float('10')
  • int('10')
  • float('10.8')
  • int('10.8')

Answer :int('10.8')

Python Certification Exam Preparation Set 17

What will be the value of the following Python expression?


Options are :

  • 3
  • 7
  • 77
  • 0

Answer :7

The expression 2**2**3 is evaluates as: (2**2)**3.


Options are :

  • True
  • False

Answer :False

What will be the output of the following Python code snippet if x=1?


Options are :

  • 8
  • 1
  • 2
  • 4

Answer :4

Python Certification Exam Preparation Set 58

What will be the output of the following Python expression?


Options are :

  • '0b10111'
  • '0b11101'
  • '0b11111'
  • '0b11011'

Answer :'0b11101'

What will be the value of x in the following Python expression?


Options are :

  • 8
  • 4
  • 2
  • 1

Answer :8

What will be the output of the following Python expression?


Options are :

  • 1011
  • 11
  • 13
  • 1101

Answer :1011

Python Practice Test MCQ Certified Go from 0 to Expert hero Set 15

To find the decimal value of 1111, that is 15, we can use the function:


Options are :

  • int(1111,10)
  • int('1111',10)
  • int(1111,2)
  • int('1111',2)

Answer :int('1111',2)

What will be the output of the following Python expression if x=15 and y=12?


Options are :

  • b1101
  • 0b1101
  • 12
  • 1101

Answer :12

Which of the following expressions results in an error?


Options are :

  • int(1011)
  • int('1011',23)
  • int(1011,2)
  • int('1011')

Answer :int(1011,2)

", $fileContentFew); $title = explode("

Python Certification Exam Preparation Set 31

Which of the following represents the bitwise XOR operator?


Options are :

  • &
  • ^
  • |
  • !

Answer :^

What is the value of the following Python expression?


Options are :

  • '0bx1000'
  • 8
  • 1000
  • '0b1000'

Answer :'0b1000'

What will be the output of the following Python expression?


Options are :

  • 115
  • 116
  • 117
  • 118

Answer :117

Python Practice Test MCQ Certified Go from 0 to Expert hero Set 1

It is not possible for the two's complement value to be equal to the original value in any case.


Options are :

  • True
  • False

Answer :False

Comment / Suggestion Section
Point our Mistakes and Post Your Suggestions