Log in
Sign up for FREE
arrow_back
Library

if condition

star
star
star
star
star
Last updated over 5 years ago
10 questions
0
0
0
1
1
1
1
1
1
1
Question 1
1.

Enter your name

Question 2
2.

Enter your class

Question 3
3.

Enter your section

Question 4
4.

In Python, a decision can be made by using if else statement.

Question 5
5.

checking multiple condition in python requires if elif

Question 6
6.

The if statement in python is

Question 7
7.

The code inside the if statement is executed once

Question 8
8.

What does the following code print to the console?
if 5 > 10:
print("fan")
elif 8 != 9:
print("glass")
else:
print("cream")

Question 9
9.

What does the following code print to the console?
if True:
print(“101”)
else:
print(“202”)

Question 10
10.

What does the following Python program display?
x = 3
if ( x == 0 ):
print "Am I here?"
elif ( x == 3 ):
print "Or here?",
print "Or over here?"