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

The one's complement of 110010101 is:


Options are :

  • 001101010
  • 110010101
  • 001101011
  • 110010100

Answer :001101010

Bitwise _________ gives 1 if either of the bits is 1 and 0 when both of the bits are 1.


Options are :

  • OR
  • AND
  • XOR
  • NOT

Answer :XOR

Python Certification Exam Preparation Set 50

What will be the output of the following Python expression?


Options are :

  • 2
  • 4
  • 8
  • 12

Answer :8

Any odd number on being AND-ed with ________ always gives 1. Hint: Any even number on being AND-ed with this value always gives 0.


Options are :

  • 10
  • 2
  • 1
  • 0

Answer :1

What will be the value of the following Python expression?


Options are :

  • 0b10000
  • 0b10001000
  • 0b1000b1000
  • 0b10000b1000

Answer :0b10000b1000

Python Certification Exam Preparation Set 14

Which of the following expressions can be used to multiply a given number 'a' by 4?


Options are :

  • a<<2
  • a<<4
  • a>>2
  • a>>4

Answer :a<<2

What will be the output of the following Python code if a=10 and b =20?


Options are :

  • 10 20
  • 10 10
  • 20 10
  • 20 20

Answer :20 10

what is the two's complement of -44?


Options are :

  • 1011011
  • 11010100
  • 11101011
  • 10110011

Answer :11010100

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

What will be the output of the following Python expression?


Options are :

  • 101
  • -101
  • 100
  • -100

Answer :-101

What will be the output of the following Python code snippet?


Options are :

  • True True
  • False True
  • False False
  • True False

Answer :True False

What will be the output of the following Python code snippet?


Options are :

  • error
  • no output
  • hello
  • morning

Answer :hello

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

What will be the output of the following Python code snippet?


Options are :

  • True True
  • True False
  • False True
  • False False

Answer :True False

What will be the output of the following Python code?


Options are :

  • t
  • f
  • No output
  • Error

Answer :t

What will be the output of the following Python code?


Options are :

  • Error
  • [1, 0, 2, 0, 'hello', ", []]
  • [1, 0, 2, 'hello', ", []]
  • [1, 2, 'hello']

Answer :[1, 2, 'hello']

Python Certification Exam Preparation Set 53

What will be the output of the following Python code if the system date is 21st June, 2017 (Wednesday)?


Options are :

  • [] {}
  • [] []
  • {} []
  • {} {}

Answer : {} []

What will be the output of the following Python code?


Options are :

  • pass
  • true
  • false
  • error

Answer :true

What will be the output of the following Python code?


Options are :

  • error
  • hello
  • good
  • bad

Answer :good

Python Certification Exam Preparation Set 56

Which of the following Boolean expressions is not logically equivalent to the other three?


Options are :

  • not(-6<0 or-6>10)
  • -6>=0 and -6<=10
  • not(-6<10 or-6==10)
  • not(-6>10 or-6==10)

Answer :not(-6>10 or-6==10)

What will be the output of the following Python code snippet?


Options are :

  • True
  • False
  • Error
  • no output

Answer :False

What will be the output of the following Python code snippet?


Options are :

  • 00000hi
  • 000hi
  • hi000
  • error

Answer :error

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

What will be the output of the following Python code snippet?


Options are :

  • 56 blank spaces before san-foundry
  • 56 blank spaces before san and foundry
  • 56 blank spaces after san-foundry
  • no change

Answer :56 blank spaces before san-foundry

What will be the output of the following Python expression if x=456?


Options are :

  • 000456
  • 456000
  • 456
  • error

Answer :456

What will be the output of the following Python expression if X=345?


Options are :

  • 345000
  • 000345
  • 000000345
  • 345000000

Answer :000345

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

Which of the following formatting options can be used in order to add 'n' blank spaces after a given string 'S'?


Options are :

  • print("-ns"%S)
  • print("-ns"%S)
  • print("%ns"%S)
  • print("%-ns"%S)

Answer :print("%-ns"%S)

What will be the output of the following Python code?


Options are :

  • m, y, , n, a, m, e, , i, s, , x,
  • m, y, , n, a, m, e, , i, s, , x
  • my, name, is, x,
  • error

Answer :m, y, , n, a, m, e, , i, s, , x,

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

Python Certification Exam Preparation Set 3

What will be the output of the following Python code?


Options are :

  • m, y, , n, a, m, e, , i, s, , x,
  • m, y, , n, a, m, e, , i, s, , x
  • my, name, is, x,
  • error

Answer :my, name, is, x,

What will be the output of the following Python code snippet?


Options are :

  • 0 1 2 3
  • 0 1 2 2
  • 3 3 3 3
  • error

Answer :0 1 2 2

What will be the output of the following Python code snippet?


Options are :

  • 0 1 2 3
  • 0 1 2 2
  • 3 3 3 3
  • error

Answer :0 1 2 3

Python Certification Exam Preparation Set 34

What will be the output of the following Python code snippet?


Options are :

  • -2 -1
  • 0
  • error
  • none of the mentioned

Answer :error

What will be the output of the following Python code snippet?


Options are :

  • m, y, , n, a, m, e, , i, s, , x,
  • m, y, , n, a, m, e, , i, s, , x
  • my, name, is, x,
  • error

Answer :m, y, , n, a, m, e, , i, s, , x,

Comment / Suggestion Section
Point our Mistakes and Post Your Suggestions