
Python If-Else Statements Quiz

Interactive Video
•
Computers
•
9th - 10th Grade
•
Hard
Nancy Jackson
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the primary purpose of if-else statements in Python?
To perform arithmetic operations
To create loops
To navigate decision-making paths in code
To store data in variables
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In Python, how do you define a block of code that should be executed if a condition is true?
Using square brackets []
Using indentation
Using parentheses ()
Using braces {}
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What function is used to get user input in Python?
read()
raw_input()
get()
input()
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will happen if you try to convert a non-integer string to an integer in Python?
The program will convert it to zero
The program will raise a ValueError
The program will print 'NaN'
The program will continue without error
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which operator is used to determine if a number is even or odd?
Modulus operator (%)
Addition operator (+)
Division operator (/)
Multiplication operator (*)
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the 'elif' keyword in Python?
To end a loop
To handle multiple conditions
To define a function
To import a module
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How can you classify a triangle with all sides of different lengths?
Scalene
Equilateral
Right-angled
Isosceles
Create a free account and access millions of resources
Similar Resources on Wayground
11 questions
Understanding Subprograms in Programming

Interactive video
•
9th - 12th Grade
6 questions
Understanding Arithmetic in Python 3

Interactive video
•
9th - 10th Grade
11 questions
Motor Stopping Methods and Functions

Interactive video
•
9th - 10th Grade
11 questions
Understanding Runtime and Input Validation Errors

Interactive video
•
9th - 10th Grade
11 questions
Understanding Procedures, Functions, and Parameters

Interactive video
•
9th - 10th Grade
11 questions
Exploring Variables in Computer Science

Interactive video
•
9th Grade
12 questions
Mathematical Functions and Concepts

Interactive video
•
9th - 10th Grade
11 questions
File Handling in Python and OCR

Interactive video
•
9th - 12th Grade
Popular Resources on Wayground
10 questions
SR&R 2025-2026 Practice Quiz

Quiz
•
6th - 8th Grade
30 questions
Review of Grade Level Rules WJH

Quiz
•
6th - 8th Grade
6 questions
PRIDE in the Hallways and Bathrooms

Lesson
•
12th Grade
10 questions
Lab Safety Procedures and Guidelines

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

Quiz
•
3rd Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
15 questions
Subtracting Integers

Quiz
•
7th Grade