16 questions
‘If’ is a decision making statement
TRUE
FALSE
An If statement can be executed multiple times
FALSE
TRUE
The ‘else’ statement is optional in Python
TRUE
FALSE
The code inside ‘If’ statement is executed only once
FALSE
TRUE
It is possible to execute both the statements under if and else at the same time.
TRUE
FALSE
Syntax:
If (condition):
Statement1…
Statement2…
TRUE
FALSE
There can be an else statement without an if statement
FALSE
TRUE
The relational operators cannot be used within a if condition
FALSE
TRUE
When the if condition is false, it exits the program
TRUE
FALSE
What does an IF statement do?
Closes the program
Asks a question
Makes a decision
Repeats a code
How many choices are possible when using a single if-else statement?
1
2
3
4
This operator means that one value is same as the other value
<
==
>
!=
Fill in the blanks so that people of 18 years and older are allowed to vote
if age____________18:
print("Too young")
else:
print("Go Vote")
<=
<
>=
>
Which of the following is a Python command word used to indicate we want to set up a conditional statement
if
when
while
for