Python - Things to know before proceed - Syntax ( Indentation, Comments ) Quiz
# | Quiz |
---|---|
1
Discuss
|
Syntax ( Indentation, Comments )
Bitwise _________ gives 1 if either of the bits is 1 and 0 when both of the bits are 1.
Solution |
2
Discuss
|
Syntax ( Indentation, Comments )
What will be the output of the following Python expression?
Solution |
3
Discuss
|
Syntax ( Indentation, Comments )
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.
Solution |
4
Discuss
|
Syntax ( Indentation, Comments )
What will be the value of the following Python expression?
Solution |
5
Discuss
|
Syntax ( Indentation, Comments )
Which of the following expressions can be used to multiply a given number ‘a’ by 4?
Solution |
6
Discuss
|
Syntax ( Indentation, Comments )
What will be the output of the following Python code if a=10 and b =20?
Solution |
7
Discuss
|
Syntax ( Indentation, Comments )
What is the two’s complement of -44?
Solution |
8
Discuss
|
Syntax ( Indentation, Comments )
What will be the output of the following Python expression?
Solution |
9
Discuss
|
Syntax ( Indentation, Comments )
What will be the output of the following Python expression?
Solution |
10
Discuss
|
Syntax ( Indentation, Comments )
What will be the value of X in the following Python expression?
Solution |
11
Discuss
|
Syntax ( Indentation, Comments )
Which of the following expressions involves coercion when evaluated in Python?
Solution |
12
Discuss
|
Syntax ( Indentation, Comments )
What will be the output of the following Python expression?
Solution |
13
Discuss
|
Syntax ( Indentation, Comments )
Which among the following list of operators has the highest precedence?
Solution |
14
Discuss
|
Syntax ( Indentation, Comments )
What will be the value of the following Python expression?
Solution |
15
Discuss
|
Syntax ( Indentation, Comments )
Which of the following expressions is an example of type conversion?
Solution |
16
Discuss
|
Syntax ( Indentation, Comments )
Which of the following expressions results in an error?
Solution |
17
Discuss
|
Syntax ( Indentation, Comments )
What will be the value of the following Python expression?
Solution |
18
Discuss
|
Syntax ( Indentation, Comments )
The expression 2**2**3 is evaluates as: (2**2)**3.
Solution |
19
Discuss
|
Syntax ( Indentation, Comments )
What will be the output of the following Python code snippet?
Solution |
20
Discuss
|
Syntax ( Indentation, Comments )
What will be the output of the following Python code snippet?
Solution |
21
Discuss
|
Syntax ( Indentation, Comments )
What will be the output of the following Python code snippet?
Solution |
22
Discuss
|
Syntax ( Indentation, Comments )
What will be the output of the following Python code?
Solution |
23
Discuss
|
Syntax ( Indentation, Comments )
What will be the output of the following Python code?
Solution |
24
Discuss
|
Syntax ( Indentation, Comments )
What will be the output of the following Python code?
Solution |
25
Discuss
|
Syntax ( Indentation, Comments )
What will be the output of the following Python code?
Solution |
26
Discuss
|
Syntax ( Indentation, Comments )
Which of the following Boolean expressions is not logically equivalent to the other three?
Solution |
27
Discuss
|
Syntax ( Indentation, Comments )
What will be the output of the following Python code snippet?
Solution |
28
Discuss
|
Syntax ( Indentation, Comments )
What will be the output of the following Python code snippet if x=1?
Solution |
29
Discuss
|
Syntax ( Indentation, Comments )
What will be the output of the following Python expression?
Solution |
30
Discuss
|
Syntax ( Indentation, Comments )
What will be the value of x in the following Python expression, if the result of that expression is 2?
Solution |
31
Discuss
|
Syntax ( Indentation, Comments )
What will be the output of the following Python expression?
Solution |
32
Discuss
|
Syntax ( Indentation, Comments )
To find the decimal value of 1111, that is 15, we can use the function:
Solution |
33
Discuss
|
Syntax ( Indentation, Comments )
What will be the output of the following Python expression if x=15 and y=12?
Solution |
34
Discuss
|
Syntax ( Indentation, Comments )
Which of the following expressions results in an error?
Solution |
35
Discuss
|
Syntax ( Indentation, Comments )
Which of the following represents the bitwise XOR operator?
Solution |
36
Discuss
|
Syntax ( Indentation, Comments )
What is the value of the following Python expression?
Solution |
37
Discuss
|
Syntax ( Indentation, Comments )
What will be the output of the following Python expression?
Solution |
# | Quiz |