Conditional Statements Quiz

Conditional Statements Quiz

University

15 Qs

quiz-placeholder

Similar activities

Python workshop

Python workshop

University

10 Qs

Y6 - Data - Introduction to Spreadsheets Assessment NCCE

Y6 - Data - Introduction to Spreadsheets Assessment NCCE

6th Grade - University

11 Qs

CV System and Shock - A Christmas Quiz

CV System and Shock - A Christmas Quiz

University

10 Qs

Python Programming Quiz

Python Programming Quiz

University

20 Qs

Polymorphism - Objective Exercises

Polymorphism - Objective Exercises

University

11 Qs

PSCP Quiz - sec A

PSCP Quiz - sec A

University

10 Qs

Economics Quiz

Economics Quiz

9th Grade - University

16 Qs

Python Quiz

Python Quiz

10th Grade - University

15 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?