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.
Question 5
5.
Question 6
6.
Question 7
7.
Question 8
8.
Question 9
9.
Question 10
10.
In
Python
, a decision can be made by using if else statement.
a) True
b) False
checking multiple condition in python requires if elif
a) True
b) False
The if statement in python is
logical statement
expressioni
optional
control flow statement
The code inside the if statement is executed once
True
False
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
What does the following code print to the console?
if
True:
print
(“101”)
else
:
print
(“202”)
101
102
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?