Log in
Sign up for FREE
arrow_back
Library
if condition
By sunita gupta
star
star
star
star
star
Share
share
Last updated over 5 years ago
10 questions
Add this activity
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.
a) True
b) False
Question 5
5.
checking multiple condition in python requires if elif
a) True
b) False
Question 6
6.
The if statement in python is
logical statement
expressioni
optional
control flow statement
Question 7
7.
The code inside the if statement is executed once
True
False
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")
fan
glass
cream
none of above
Question 9
9.
What does the following code print to the console?
if
True:
print
(“101”)
else
:
print
(“202”)
101
102
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?"
Am I here?
Or here?
Am I here? Or here?
Or here? Or over here?
Am I here? Or over here?