Conditional Statements Quiz

Conditional Statements Quiz

University

15 Qs

quiz-placeholder

Similar activities

B3 Q1 review

B3 Q1 review

University

20 Qs

2 English 2/3 quiz 10

2 English 2/3 quiz 10

9th Grade - University

20 Qs

Soal PSAS

Soal PSAS

7th Grade - University

17 Qs

Python Programming Quiz

Python Programming Quiz

University

20 Qs

Quizathon 9

Quizathon 9

University

15 Qs

Motion, Distance, and Displacement Quiz

Motion, Distance, and Displacement Quiz

10th Grade - University

20 Qs

PS LISTRIK MAGNET SUMBER ENERGI

PS LISTRIK MAGNET SUMBER ENERGI

9th Grade - University

13 Qs

Conditional Statements Quiz

Conditional Statements Quiz

Assessment

Quiz

others

University

Medium

Created by

Jyotsna Shastry

Used 2+ times

FREE Resource

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What keyword would you use to add an alternative condition to an if statement?
else if
elseif
elif
None of the above

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code snippet? x = 10 if x > 5: print("x is greater than 5")
x is greater than 5
x is less than 5
x is equal than 5
No Output

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the given below program? if 1 + 3 == 7: print("Hello") else: print("Know Program")
Hello
Know Program
Complied Successfully ,No Output
Error

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code snippet? x = 5 if x < 3: print("x is less than 3") elif x == 3: print("x is equal to 3") else: print("x is greater than 3")
x is less than 3
x is equal than 3
x is greater than 3
No Output

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How can you execute multiple statements under a single if block in Python?
Separate statements with a semicolon
Indent the statements to the same level
Use the and keyword between statements
Use the elif keyword

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What signifies the end of a statement block or suite in Python?
A comment
}
A line that is indented less than the previous line
end

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

7.Which one of the following is a valid Python if statement.
f a>=2 :
if (a >= 2)
c) if (a => 22)
if a >= 22

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?