
PYTHON Viva-Voce Questions
Quiz
•
Computers
•
University
•
Practice Problem
•
Hard
Anusree CSE
FREE Resource
Student preview

20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
20 mins • 1 pt
Which of the following best describes the difference between a list and an array in Python?
Lists can store elements of different data types, while arrays require all elements to be of the same data type.
Lists are immutable, while arrays are mutable.
Arrays can store elements of different data types, while lists require all elements to be of the same data type.
Lists are used only for mathematical operations, while arrays are used for general data storage.
2.
MULTIPLE CHOICE QUESTION
20 mins • 1 pt
Functions are used because:
They help organize code and make it reusable.
They make the code run slower.
They increase the complexity of the code unnecessarily.
They are required for every program to run.
3.
MULTIPLE CHOICE QUESTION
20 mins • 1 pt
Which of the following methods can be used to add, remove, and modify elements in a list in Python?
append(), remove(), and indexing assignment
print(), input(), and len()
sort(), reverse(), and max()
open(), close(), and read()
4.
MULTIPLE CHOICE QUESTION
20 mins • 1 pt
A set in Python is different from a list because:
A set is an unordered collection of unique elements, while a list is an ordered collection that can have duplicates.
A set is an ordered collection that allows duplicates, while a list is unordered and only allows unique elements.
A set and a list are both ordered collections that allow duplicates.
A set is a mutable collection, while a list is immutable.
5.
MULTIPLE CHOICE QUESTION
20 mins • 1 pt
The difference between union(), intersection(), and difference() methods in sets is:
union() returns all unique elements from both sets, intersection() returns only common elements, and difference() returns elements present in the first set but not in the second.
union() returns only common elements, intersection() returns all unique elements, and difference() returns elements present in both sets.
union() returns elements present in the first set but not in the second, intersection() returns all unique elements, and difference() returns only common elements.
union() returns duplicate elements, intersection() returns all elements, and difference() returns only unique elements.
6.
MULTIPLE CHOICE QUESTION
20 mins • 1 pt
A tuple is different from a list in which of the following ways?
A tuple is immutable, while a list is mutable.
A tuple can only store numbers, while a list can store any data type.
A tuple is always longer than a list.
A tuple is used only for mathematical operations, while a list is used for general purposes.
7.
MULTIPLE CHOICE QUESTION
20 mins • 1 pt
Which of the following statements correctly differentiates between mutable and immutable sequence datatypes in Python?
Mutable sequences can be changed after creation, while immutable sequences cannot be changed after creation.
Immutable sequences can be changed after creation, while mutable sequences cannot be changed after creation.
Both mutable and immutable sequences can be changed after creation.
Neither mutable nor immutable sequences can be changed after creation.
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Popular Resources on Wayground
8 questions
2 Step Word Problems
Quiz
•
KG - University
20 questions
Comparing Fractions
Quiz
•
4th Grade
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Latin Bases claus(clois,clos, clud, clus) and ped
Quiz
•
6th - 8th Grade
22 questions
fractions
Quiz
•
3rd Grade
7 questions
The Story of Books
Quiz
•
6th - 8th Grade
Discover more resources for Computers
8 questions
2 Step Word Problems
Quiz
•
KG - University
7 questions
Comparing Fractions
Interactive video
•
1st Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
10 questions
14.2 Independent/Dependent Variables
Quiz
•
KG - University
18 questions
Great Lakes States
Quiz
•
KG - University
7 questions
DNA, Chromosomes, Genes, and Traits: An Intro to Heredity
Interactive video
•
11th Grade - University
7 questions
Reflexive Verbs in Spanish
Lesson
•
9th Grade - University
7 questions
Narrative Writing 1
Interactive video
•
4th Grade - University