WorksheetsPython - Operators and Conditional Statement
Total questions: 10
Worksheet time: 5mins
In the given expression find out the operator :
x - y
Arithmetic Operators
Bitwise Operators
Assignment Operators
Logical Operators
what will be the output of the given code:
x = 400
if (X % 2 == 0):
print(" You are a good Programmer")
else :
print("You are Pro Level Programmer")
You are a good Programmer
You are Pro Level Programmer
Nothing will be Printed
Error Message
To assign a value to a variable which operator is used ?
x = 5
Arithmetic
Logical
Assignment
Equality
Find out the output of the given code :
a = 20
b = 15
c = 15.0
if( b == c ):
print("Equal")
else :
print("Not Equal")
Equal
Not Equal
Error
Nothing Will be printed
Find out the output of the given code :
x = 20
y = 15
if (x != y):
print("False")
else :
print("True")
True
False
Error
Nothing Will be Printed
Find Out the output of the given code :
a = 5
b = 3
if ( a > 4 and b > 2):
print(" Good Morning! ")
else :
print(" Good Evening!")
Error
Nothing will be printed
Good Evening!
Good Morning!
which type of data is this :
Odd = [ 1, 3, 5, 7, 9]
Int
Set
List
Tuple
Find Out the output of the given code :
a = 2
print(a**3)
2
6
5
8
What will be the output of the given code ?
a = 1
while( a< 6):
print(a)
a= a+1
0, 1, 2, 3, 4, 5
0, 1, 2, 3, 4, 5, 6
1, 2, 3, 4, 5
1, 2, 3, 4, 5, 6
What is the use of 'break' keyword in a loop ?
repeat the steps
to skip the current iteration of the loop
Stop the execution of the program
to break the code in several parts
