[0, 2, 4]
[1, 3, 5]
[0, 1, 2, 5]
[0, 5, 2]
[10, 8, 6]
[9, 7, 5]
[6, 8, 10]
[5, 7, 9]
[]
[2, 5, 8]
[8, 5, 2]
Numbers
String
List
Slice
int(x [,base])
long(x [,base])
float(x)
str(x)
27
9
3
1
True
False
Machine dependent
Error
What will following code segment print?
a=True b=False c=False if not a or b: print(1) elif not a or not b and c: print(2) elif not a or b or not b and a: print(3) else: print(4)
2
4
/ /
>
and
?
20
20.0
28
28.0
Int
Float
int or float
None of these
%
/
//
||
*
**
<
==
or
equal
not
a+√b
a+√b j
a+bj
a+√j
ascii()
getAscii()
get_ascii()
ord()
What will be the output after the following statements?
for i in range(1,6): print(i, end='') if i == 3: break
1 2
1 2 3
1 2 3 4
1 2 3 4 5
What will be the output of the following pseudocode, where ^ represent XOR operation ?
Integer a, b, c set b = 4, a = 3 c =a ^ b Print c
5
7
Selection
Sequential
Simple
Loop
What will be the output of the following Python code?
from math import pow print(math.pow(2,3))
Nothing is printed
8
Error, method pow doesn’t exist in math module
Error, the statement should be: print(pow(2,3))