
Python Operators & Conditionals Quiz

Quiz
•
Computers
•
11th Grade
•
Medium

amit soni
Used 1+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the result of 5 + 3?
4
8
10
7
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which operator is used for exponentiation in Python?
*
//
^
**
^*
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the expression '10 > 5'?
false
5 > 10
10 == 5
true
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What logical operator is used for 'and' in Python?
and
or
not
xor
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
When is an 'if' statement executed in Python?
When the program encounters a syntax error
When the 'if' statement is commented out
When the condition specified in the 'if' statement evaluates to True.
When the condition is False
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the syntax for an 'if-else' statement in Python?
if condition: # code block for true condition else: # code block for another true condition
if condition: # code block for true condition else: # code block for false condition
if condition: # code block for true condition elif: # code block for another condition
if condition: # code block for true condition else: # code block for false condition
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How can you nest 'if' statements in Python?
if condition1: if condition2: # Code block
if condition1: # Code block else: if condition2:
if condition1: if condition2: # Code block
if condition1: # Code block if condition2:
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
AP Computer Science-Quiz 2(G10)

Quiz
•
9th - 12th Grade
15 questions
Functions in Python

Quiz
•
9th - 12th Grade
15 questions
ASK F2 -KOD ARAHAN (PYTHON)

Quiz
•
1st Grade - University
13 questions
Fundamentals of Python

Quiz
•
9th - 12th Grade
10 questions
Code.org Unit 5 - Loops

Quiz
•
9th - 12th Grade
10 questions
Conditional statements in python

Quiz
•
11th - 12th Grade
15 questions
Basic Python Coding

Quiz
•
11th - 12th Grade
10 questions
Python Exception Handling

Quiz
•
10th - 12th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade