Selection
Sequential
Simple
Loop
What will be the output of the following Python code?
x = "abcdef" i = "a" while i in x: print('i', end = " ")
no output
i i i i i i … infinite Time
a a a a a a …
a b c d e f
Yes
No
Can't say
None of these
not
or
and
xor
if / else not used in python
None of the above.
for
While
do-while
while
Both A and B
None of the above
directs the order of execution of the statements in the program
dictates what happens before the program starts and after it terminates
defines program-specific data structures
manages the input and output of control characters
27
9
3
1
20.0
20
40.0
40
What will be the value of X in the following Python expression?
x = 2+9*((3*12)-8)/10
30.0
30.8
28.4
27.2
Type Casting
Data Transformation
Type modification
Variable Shifting
k^1
k**1
k^ ^1
k^*1
6
1.5
Error
do..while
if..elif
i = 1while True: if i%7 == 0: break print(i) i += 1
1 2 3 4 5 6
1 2 3 4 5 6 7
error
none of the mentioned
29.0
14.9
12.3
100
-100
-101
101
What will the following code output?
a=555 b=55 print( b in a)
True
False
55
TypeError
n=5 while n>0: n-=1 if n==2: continue print(n,end=' ')
5 4 3 1 0
4 3 1 0
4 3 2
none of these
What will be the output of the following Python expression?
print(4.00/(2.0+2.0))
1.0
1.00
What will be the value of the following Python expression?
print(4+2**5//10)
7
77
0
print(float(4+int(2.39)%2))
5.0
5
4.0
4
break
continue
pass
assert
28
28.0
unichr (x)
oct (x)
chr(x)
None of the these
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
18
10
for i in range(5): if i == 5: break else: print(i)else: print("Here")
0 1 2 3 4 Here
0 1 2 3 4 5 Here
0 1 2 3 4
int
bool
float
None
Arithmetic or Relational expression
Arithmetic or Logical expression
Relational or Logical expression
Arithmetic
8
11
4.0 + float(3)
5.3 + 6.3
5.0 + 3
3 + 7
What is the output of the following program:
i = 0while i < 3: print (i) i=i+1 print (i+1)
0 2 1 3 2 4
0 1 2 3 4 5
Infinite loop
0 1 2 3
//
?
<
infinite
ZeroDivisionError
i = 1while False: if i%2 == 0: break print(i) i += 2
1 3 5 7 …
1 2 3 4 …
Nothing will be printed
12.6
'12.6'
12
Syntax Error
/
%
*
find the output of following code:
import mathprint(math.fabs(-3.4))
-3.4
3.4
4.3
What will be the output after following statements?
x = 2if x < 5: print(x)else: pass
2 3 4
2
None of These
[0, 2, 4]
[1, 3, 5]
[0, 1, 2, 5]
[0, 5, 2]
+
-
( )
x=0if x: print("True")else: print("False")
Identifier
Expression
Syntax
Task
+5
-11
+11
-5