
Quiz Competition

Quiz
•
Education
•
University
•
Hard
S. Aarthi
Used 2+ times
FREE Resource
30 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
1. What will be the output of the following code?
[1], [2], [3], [4]
[1], [1, 2], [3], [1, 2, 4]
[1], [1, 2], [3], [1, 2, 3, 4]
[1], [1, 2], [3], [3, 4]
Answer explanation
The default argument lst=[] is mutable. It retains its state between function calls unless explicitly overridden.
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
2. What will be the output?
[1, 2, 3]
Error
[1, 2, 3, [4, 5]]
[1, 2, 3, 4, 5]
Answer explanation
Since y = x, both variables point to the same list. The += operation modifies the existing list, so x also gets updated.
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
3. What is the output of this code?
[1], [2], [3]
[1], [2, 3], [1, 3]
[1], [2], [1, 3]
[1], [2], [1, 2, 3]
Answer explanation
Similar to Question 1, the default mutable list retains its state across function calls.
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
4. What will be the output?
True
False
None
Error
Answer explanation
Any non-empty string in Python is truthy, regardless of its content.
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
5. What is the result of this expression?
True
False
None
Error
Answer explanation
Due to floating-point precision errors, 0.1 + 0.2 is not exactly 0.3, but rather 0.30000000000000004.
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
6. What does this return?
[1, 2, 3, 4, 5]
{1, 2, 2, 3, 4, 4, 5}
Error
{1, 2, 3, 4, 5}
Answer explanation
A set only stores unique elements.
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
7. Which of the following is immutable in Python?
List
Tuple
Dictionary
Set
Answer explanation
Lists, dictionaries, and sets are mutable, while tuples are immutable.
Create a free account and access millions of resources
Similar Resources on Wayground
35 questions
SAS Pemrograman Python Kelas XII

Quiz
•
10th Grade - University
25 questions
LÉXICO "Y - Z"

Quiz
•
University
25 questions
UNIT V ERROR CONTROL CODING: CONVOLUTION CODES

Quiz
•
University
25 questions
Inter School Quiz (English Medium) Paper 03

Quiz
•
University
30 questions
Soal Mid Sem. Genap Kosentrasi Keahlian XI TEI

Quiz
•
11th Grade - University
25 questions
UNIT 4 ERROR CONTROL CODING: BLOCK CODES

Quiz
•
University
25 questions
Bab 1 Perniagaan dan Persekitarannya

Quiz
•
University
25 questions
Inter School Quiz (English Medium) Paper 04

Quiz
•
University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

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

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Education
10 questions
Would you rather...

Quiz
•
KG - University
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
10 questions
The Constitution, the Articles, and Federalism Crash Course US History

Interactive video
•
11th Grade - University
7 questions
Figurative Language: Idioms, Similes, and Metaphors

Interactive video
•
4th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
16 questions
Water Modeling Activity

Lesson
•
11th Grade - University
10 questions
ACT English prep

Quiz
•
9th Grade - University