Similar Collections


    No collections found

questions

Title
What is the maximum possible length of an identifier

What is the maximum possible length of an identifier?


  1. 31 characters
  2. 63 characters
  3. 79 characters
  4. none of the mentioned
discuss
Which of the following is invalid

Which of the following is invalid?


  1. _a = 1
  2. __a = 1
  3. __str__ = 1
  4. none of the mentioned
discuss
Why are local variable names beginning with an underscore discouraged

Why are local variable names beginning with an underscore discouraged?


  1. they are used to indicate a private variables of a class
  2. they confuse the interpreter
  3. they are used to indicate global variables
  4. they slow down execution
discuss
What is the value of the following expression

What is the value of the following expression:

24//6%3, 24//4//2

  1. (1,3)
  2. (0,3)
  3. (1,0)
  4. (3,1)
discuss
Which among the following list of operators has the highest precedence

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

 +, -, **, %, /, <<, >>, |

  1. <<, >>
  2. **
  3. |
  4. %
discuss
What is the value of the expression

What is the value of the expression:

float(4+int(2.39)%2)

  1. 5.0
  2. 5
  3. 4.0
  4. 4
discuss
Which of the following expressions is an example of type conversion

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


  1. 4.0 + float(3)
  2. 5.3 + 6.3
  3. 5.0 + 3
  4. 3 + 7
discuss
Which of the following expressions results in an error

Which of the following expressions results in an error?


  1. float(‘10’)
  2. int(‘10’)
  3. float(’10.8’)
  4. int(’10.8’)
discuss
What is the value of the expression

What is the value of the expression:

4+2**5//10

  1. 3
  2. 7
  3. 77
  4. 0
discuss
State true or false

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


  1. True
  2. False
discuss
The output of the expression is

The output of the expression is:

bin(29)

  1. ‘0b10111’
  2. ‘0b11101’
  3. ‘0b11111’
  4. ‘0b11011’
discuss
What is the value of x if

What is the value of x if:

x>>2=2

  1. 8
  2. 4
  3. 2
  4. 1
discuss
What is the result of the expression

What is the result of the expression:

int(1011)?

  1. 1011
  2. 11
  3. 13
  4. 1101
discuss
State true or false

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


  1. True
  2. False
discuss
The output of the snippet of code shown below

The output of the snippet of code shown below?

bool(‘False’)
bool()

  1. True True
  2. False True
  3. False False
  4. True False
discuss
What is the output of the snippet of code shown below

What is the output of the snippet of code shown below?

['hello', 'morning'][bool('')]

  1. error
  2. no output
  3. hello
  4. morning
discuss
What is the output of the code shown below

What is the output of the code shown below?

not(3>4)
not(1&1)

  1. True True
  2. True False
  3. False True
  4. False False
discuss
What is the output of the code shown

What is the output of the code shown?

['f', 't'][bool('spam')]

  1. t
  2. f
  3. No output
  4. Error
discuss
What is the output of the code shown below

What is the output of the code shown below?

l=[1, 0, 2, 0, 'hello', '', []]
list(filter(bool, l))

  1. Error
  2. [1, 0, 2, 0, ‘hello’, ”, []]
  3. [1, 0, 2, ‘hello’, ”, []]
  4. [1, 2, ‘hello’]
discuss
What is the output of the following code if the system date is 21st June, 2017 (Wednesday)

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

[ ] or {}
{} or [ ]

  1. [ ] {}
  2. [ ] [ ]
  3. {} [ ]
  4. {} {}
discuss
total MCQs: 93

MCQs

93

Views

155

Best Answers

299

Points

5