Python Conditionals and If Statements

Quiz
•
Computers
•
8th Grade
•
Medium

Samuel Markham
Used 3+ times
FREE Resource
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code snippet? ```python if 5 > 3: print("Hello") ```
Goodbye
Hello
Error
Nothing
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a correct if-elif-else structure in Python?
```python if x > 10: print("Greater") elif x == 10: print("Equal") else: print("Smaller") ```
```python if x > 10: print("Greater") else if x == 10: print("Equal") else: print("Smaller") ```
```python if x > 10: print("Greater") elif x == 10: print("Equal") else if: print("Smaller") ```
```python if x > 10: print("Greater") elif x == 10: print("Equal") ```
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
True
False
Error
None
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which comparison operator is used to check if two values are not equal?
==
!=
>
<
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code? ```python x = 7 if x < 10: print("Small") else: print("Large") ```
Small
Large
Error
Nothing
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a Boolean expression?
"Hello"
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code? ```python if False: print("Yes") else: print("No") ```
Yes
No
Error
Nothing
Create a free account and access millions of resources
Similar Resources on Wayground
20 questions
Procedures and Functions

Quiz
•
10th Grade
20 questions
Python Conditionals Practice

Quiz
•
9th - 12th Grade
20 questions
Python Basics & Syntax

Quiz
•
10th - 12th Grade
17 questions
Python Modulus & Exponent & If 305

Quiz
•
9th - 12th Grade
18 questions
Foundations of Programming

Quiz
•
9th - 10th Grade
15 questions
Basic Python Coding

Quiz
•
11th - 12th Grade
14 questions
Python Basics - Year 8

Quiz
•
7th - 9th Grade
11 questions
Python Boolean

Quiz
•
11th - 12th Grade
Popular Resources on Wayground
50 questions
Trivia 7/25

Quiz
•
12th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade