Conditional Statements

Conditional Statements

7th Grade

10 Qs

quiz-placeholder

Similar activities

Volcano Hunters Lesson 2 Quiz

Volcano Hunters Lesson 2 Quiz

6th - 8th Grade

10 Qs

how animals experience pain | ted-ed

how animals experience pain | ted-ed

6th - 8th Grade

13 Qs

Benchmark 3 Quizizz

Benchmark 3 Quizizz

7th Grade

13 Qs

Mathematics 7 - Quiz

Mathematics 7 - Quiz

7th Grade - University

12 Qs

Python Quiz: If Statement

Python Quiz: If Statement

7th Grade

15 Qs

แบบทดสอบหลังเรียน (Post-Test)

แบบทดสอบหลังเรียน (Post-Test)

7th Grade

10 Qs

Quiz on Sharing Personal Information

Quiz on Sharing Personal Information

6th Grade - University

15 Qs

Conditional Statements

Conditional Statements

Assessment

Quiz

others

7th Grade

Hard

Created by

Innovator Sir

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

What is the purpose of the if statement in Python?
To declare a variable
To repeat a block of code
To make decisions based on conditions
To perform arithmetic calculations

2.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

Which symbol is used to check equality in a Python if statement?
=
==
>
<

3.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

Imagine Arnav is in an if statement, what happens to the code inside the if block if the condition is False?

It magically disappears

It throws a party

It goes on vacation

It hides in a secret room

4.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

Hey there! Can you spot the correct if statement in Python?

if x equals 10:

if x==10:

if x==10 then:

if x=10'

5.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

What does the elif keyword stand for in Python?
Else if
Else loop
Equal if
End if

6.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

Kavya, Eshaan, and Aarav are having a coding challenge. What will be the output of the following code? x = 15 if x > 10: print("Greater than 10") elif x == 10: print("Equal to 10") else: print("Less than 10")

Greater than 10

Equal to 10

Less than 10

Error

7.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

Avani, Advait, and Neha are challenging each other in a coding duel. How many elif statements can come after an initial if statement?

Only one

As many as needed

Two

None

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?