
Python Quiz 6

Quiz
•
Computers
•
University
•
Hard
Nguyen Duong
FREE Resource
70 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following Python code? b=[2,3,4,5] a=list(filter(lambda x:x%2,b)) print(a)
[2,4]
[]
[3,5]
Invalid arguments for filter function
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following Python code? lst=[3,4,6,1,2] lst[1:2]=[7,8] print(lst)
[3, 7, 8, 6, 1, 2]
Syntax error
[3,[7,8],6,1,2]
[3,4,6,7,8]
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following Python code? a=[1,2,3] b=a.append(4) print(a) print(b)
[1,2,3,4]
[1,2,3,4]
Syntax error
[1,2,3]
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following Python code? >>> a=[14,52,7] >>>> b=a.copy() >>> b is a
True
False
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following Python code? a=[13,56,17] a.append([87]) a.extend([45,67]) print(a)
[13, 56, 17, [87], 45, 67]
[13, 56, 17, 87, 45, 67]
[13, 56, 17, 87,[ 45, 67]]
[13, 56, 17, [87], [45, 67]]
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following piece of code? a=list((45,)*4) print((45)*4) print(a)
180
[(45),(45),(45),(45)]
(45,45,45,45)
[45,45,45,45]
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following Python code? lst=[[1,2],[3,4]] print(sum(lst,[]))
[3],[7]
[1,2,3,4]
Error
[10]
Create a free account and access millions of resources
Similar Resources on Wayground
70 questions
Midka

Quiz
•
University
65 questions
JENIS-JENIS HARDWARE (KELAS 3)

Quiz
•
3rd Grade - University
70 questions
Computing A level AQA

Quiz
•
12th Grade - University
75 questions
EXERCÍCIO 36 - FÍSICA III (ROBÓTICA II) DURVAL 2025

Quiz
•
12th Grade - University
67 questions
HTML and CSS Quiz

Quiz
•
University
73 questions
Computer Architecture Quiz

Quiz
•
University
71 questions
Hệ điều hành (CHƯƠNG 7 - 8)

Quiz
•
University
66 questions
Chương 9

Quiz
•
University
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
21 questions
Spanish-Speaking Countries

Quiz
•
6th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
7 questions
Common and Proper Nouns

Interactive video
•
4th Grade - University
12 questions
Los numeros en español.

Lesson
•
6th Grade - University
7 questions
PC: Unit 1 Quiz Review

Quiz
•
11th Grade - University
7 questions
Supporting the Main Idea –Informational

Interactive video
•
4th Grade - University
12 questions
Hurricane or Tornado

Quiz
•
3rd Grade - University
7 questions
Enzymes (Updated)

Interactive video
•
11th Grade - University