What is the output of the following code?
print(True and False)
True
False
Error
None
65536
33
169
None of the above
55
60
555
16
32
64
None of These
generates a list of numbers, to iterate over with for loops
immediate exit from the innermost loop structure.
returned an iterator a sequence object.
Arranging numbers whether in ascending or descending order.
What will be the output of the following Python code snippet?
print(not(3>4))print(not(1&1))
True True
True False
False True
False False
Testing
Indentation
Debugging
27.2
29.0
14.9
12.3
What is the output of the following ?
print(int())
Any Random Number
0
1
What will be the output after following statements?
x = 2if x < 5: print(x)else: pass
2 3 4
1 2 3 4
2
x = 'abcd'for i in range(len(x)): i.upper()print (x)
a b c d
0 1 2 3
error
none of the mentioned
*
**
<
==
What will be the output of the following Python code?
i = 2while True: if i%3 == 0: break print(i) i += 2
2 4 6 8 10 …
2 4
2 3
nested if
if..else
else if
if..elif
What will the following code output?
a,b,c=3,5,6 b,c,a=a+1,b+2,c+3 print(a,” ”,b,” ”,c)
7 9 4
4 7 9
9 4 7
continue
check
range
break
11
8
4
5
false
ValueError occurs
TypeError occurs
Yes
No
if / else not used in python
None of the above.
6
1.5
What will be the output after the following statements?
a = 0b = 3while a + b < 8: a += 1 print(a, end='')
0 1 2 3 4
1 2 3 4 5 6
1 2 3 4 5
None of these
from math import powprint(math.pow(2,3))
Nothing is printed
Error, method pow doesn’t exist in math module
Error, the statement should be: print(pow(2,3))
ascii()
getAscii()
get_ascii()
ord()
x = ['ab', 'cd'] for i in x: x.append(i.upper()) print(x)
[‘AB’, ‘CD’]
[‘ab’, ‘cd’, ‘AB’, ‘CD’]
[‘ab’, ‘cd’]
Infinite Loop
a=555 b=55 print( b in a)
TypeError
What will be the output of the following python code?
from math import * floor(11.7)
12
11.0
none of these
9
i = 1while False: if i%2 == 0: break print(i) i += 2
1 3 5 7 …
1 2 3 4 …
Nothing will be printed
range(0,3,1)
range(1,4,1)
range(1,3)
range(1,3,0)
find the output of following code:
import mathprint(math.fabs(-3.4))
-3.4
3.4
4.3
3
Identifier
Expression
Syntax
Task
Selection
Sequential
Simple
Loop
The truncated decimal part of a number
The rounded integer value of a number.
The truncated integer value of a number.
The floor (largest integer less than or equal to the number).
What will be the output of the following Python expression?
print(4.00/(2.0+2.0))
1.0
1.00
Infinite
NULL
x = "abcdef"while i in x: print(i, end=" ")
a b c d e f
abcdef
i i i i i i …
Int
Float
int or float
[4,6]
[1, 2, 3, 4]
10
Error in Code
colon
comma
semicolon
hyphen
Entry Controlled Loop
Exit Controlled Loop
Both of the above
abc=2,00,000
a,b,c=200,300,400
a_b_c= 2,00,000
abc=200 300 400
or
equal
and
not
4.0
8.0
What will be the output of the following expression ?
x =4print(x<<2)
sqrt()
add()
rhombus()
home()
#
=
/
&