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
15 questions
CodeHS - Intro to Python - Conditionals Quiz

Quiz
•
9th Grade - Professio...
15 questions
Programming python review

Quiz
•
9th - 12th Grade
10 questions
Python Variables

Quiz
•
7th - 12th Grade
20 questions
ม.2-วิทยาการคำนวณ-โค๊ดดิ้งกับการแก้ปัญหา

Quiz
•
8th Grade
18 questions
Final Test Python Code

Quiz
•
9th - 12th Grade
20 questions
Algoritma Fungsi Phyton

Quiz
•
10th Grade
15 questions
Python elif and Nested if

Quiz
•
12th Grade
20 questions
Python String

Quiz
•
12th Grade
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
15 questions
Acceptable Use Policy (Quiz)

Quiz
•
6th - 8th Grade
25 questions
Career Vs. Job

Quiz
•
6th - 8th Grade
20 questions
Digital Citizenship

Quiz
•
8th - 12th Grade
30 questions
Introduction to Computers

Quiz
•
8th - 9th Grade
20 questions
Copyright and Fair Use

Quiz
•
6th - 8th Grade
15 questions
Computer Components Video

Interactive video
•
8th Grade
20 questions
Hardware vs. Software Quiz

Quiz
•
7th - 10th Grade