
Python Practice Test #3

Quiz
•
Other
•
Professional Development
•
Medium
Matt Little
Used 21+ times
FREE Resource
30 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
15 mins • 1 pt
What will be the output after running the following code?
func1
func3
func3
func3
func3
func1
func1
func2
func3
func3
func2
func1
2.
MULTIPLE CHOICE QUESTION
15 mins • 1 pt
What will be the output after running the following code?
[7, 2]
[7, 6, 5, 4, 3, 2]
[7, 3]
SyntaxError
3.
MULTIPLE CHOICE QUESTION
15 mins • 1 pt
What will be the output after running the following code?
Yes
True
error
No
4.
MULTIPLE CHOICE QUESTION
15 mins • 1 pt
What will be the output when the following program is run?
5,4,'Earth'
[5,4]
[5, 4, 'Earth']
{5,4,'Earth'}
5.
MULTIPLE CHOICE QUESTION
15 mins • 1 pt
What is the output of the following code:
<class 'tuple'>
<class 'list'><class 'int'>
<class 'list'>
error
6.
MULTIPLE CHOICE QUESTION
15 mins • 1 pt
What will the output be after executing this code?
True True False
False False True
False True False
False False False
Answer explanation
When bool() is provided an empty list, an empty string or the value 0 as an argument, it returns False. The expression will evaluate to True when bool () is given any other value, including negative numbers.
7.
MULTIPLE CHOICE QUESTION
15 mins • 1 pt
What is the output of the following print statement?
False
True
SyntaxError
10
Answer explanation
The is operator is an identity operator, it checks whether both the operands refer to the same object or not. The p and q have equal values, stored in the same memory location, hence p and q are same. You can use id() function to check if the variables are same: print(id(p)) print(id(q)) which will indicate the same ID for both variables.
Create a free account and access millions of resources
Similar Resources on Wayground
30 questions
2025 Logical test

Quiz
•
Professional Development
25 questions
Java Basics

Quiz
•
Professional Development
25 questions
C++ and Python Quiz

Quiz
•
Professional Development
25 questions
STEAM-ARDUİNO/CNC/DRONE modulları

Quiz
•
Professional Development
25 questions
Java Control flow stmt

Quiz
•
Professional Development
30 questions
R1-VirtuQuest2024

Quiz
•
Professional Development
28 questions
EN-Quiz 1 : Becoming a Reactive Web Developer

Quiz
•
Professional Development
25 questions
debug quiz part 2

Quiz
•
Professional Development
Popular Resources on Wayground
18 questions
Writing Launch Day 1

Lesson
•
3rd Grade
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade