Comparison Operators Quiz

Comparison Operators Quiz

10th Grade

10 Qs

quiz-placeholder

Similar activities

Python Packing & Unpacking Review

Python Packing & Unpacking Review

9th - 12th Grade

7 Qs

Java Script Quiz

Java Script Quiz

9th - 12th Grade

15 Qs

Java_ScriptES

Java_ScriptES

8th Grade - University

15 Qs

Python Basics: Operators and Variables

Python Basics: Operators and Variables

10th Grade

10 Qs

Classes & Objects

Classes & Objects

10th Grade

10 Qs

Python Review 2023-01-12

Python Review 2023-01-12

9th - 12th Grade

10 Qs

Math_functions

Math_functions

9th - 10th Grade

12 Qs

Module 06 - Advanced Ifs

Module 06 - Advanced Ifs

10th Grade

10 Qs

Comparison Operators Quiz

Comparison Operators Quiz

Assessment

Quiz

Computers

10th Grade

Hard

Created by

Shaun Wilson

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following statements correctly uses the `>` operator?

`5 > 10`

`10 > 5`

`5 > 5`

`5 > 15`

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following statements correctly uses the `<` operator?

`10 < 5`

`5 < 10`

`10 < 10`

`15 < 5`

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following statements correctly uses the `==` operator?

`5 == 10`

`10 == 5`

`5 == 5`

`15 == 5`

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following statements correctly uses the `!=` operator?

`5 != 5`

`10 != 10`

`5 != 10`

`15 != 15`

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code snippet? ```python x = 10 if x > 5: print("Greater") elif x == 5: print("Equal") else: print("Lesser") ```

`Equal`

`Lesser`

`Greater`

`None of the above`

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Identify the syntax error in the following code snippet: ```python x = 10 if x > 5 print("Greater") ```

Missing colon `:` after `if x > 5`

Missing parentheses `()` around `x > 5`

Indentation error

None of the above

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code snippet? ```python x = 3 if x < 5: print("Lesser") elif x == 3: print("Equal") else: print("Greater") ```

`Equal`

`Lesser`

`Greater`

`None of the above`

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?