Performance
Algorithmic Representation
Evaluation
Flowcharting
What is the output of the following code?
a = {1:"A", 2: "B", 3: "C"} b = {4: "D", 5: "E"} a.update(b) print(a)
{1:’A’, 2: ‘B’,3: ‘C’}
{1: ‘A’, 2: ‘b’, 3: ‘c’, 4: ‘D’, 5: ‘E’}
Error
{4: ‘D’, 5: ‘E’}
What will be the output of the following expression ?
print (7//2) print (-7//2)
3 -3
4 -4
3 -4
3 3
break
pass
continue
None of These
Design
Palnning
Algorithm
Execution
readall()
read()
readcharacter()
readchar()
softspace
mode
closed
rename
What will be the output of the following ?
import numpy as np a = np.array( [2, 3, 4, 5] ) b = np.arange(4) print(a+b)
[2 3 4 5]
[3 4 5 6]
[1 2 3 4]
[2 4 6 8]
16
32
64
eval
nonlocal
assert
finally
.
#
/
?
What value does the following expression evaluate to ?
x = 5 while x < 10: print(x, end='')
Closed loop
one time loop
Infinite loop
Evergreen loop
def function function_name():
declare function function_name():
def function_name():
declare function_name():
23
'2+3'
'23'
What is the output of the following ?
print(int())
Any Random Number
0
1
What does the following code print ?
if 2 + 5 == 8: print("TRUE") else: print("FALSE") print("TRUE")
TRUE
TRUE FALSE
TRUE TRUE
FALSE TRUE
[3, 4, 5, 20, 5, 25, 1, 3]
[1, 3, 3, 4, 5, 5, 20, 25]
[3, 5, 20, 5, 25, 1, 3]
[1, 3, 4, 5, 20, 5, 25]
print(5 + 8 * ((3*5)-9)/10)
9.0
9.8
10
10.0
import numpy as np print(np.maximum([2, 3, 4], [1, 5, 2]))
[1 5 2]
[1 5 4]
[2 3 4]
[2 5 4]
What will be the output of the following expression?
a = 2 b = 8 print(a|b ) print(a >> 1)
10 0
10 2
2 2
10 1