Unit-II-Python 2024 batch-list examples

Quiz
•
Computers
•
University
•
Medium
Ajitha Padmanabhan
Used 1+ times
FREE Resource
8 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What would be the range of index values for a list of 10 elements?
0–9
0–10
1–10
none of the mentioned
2.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which one of the following is NOT a common operation on lists?
delete
replace
interleave
append
insert
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following would be the resulting list after inserting the value 50 at index 2?
none of the mentioned
4.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
How do you create an empty list in Python?
my_list = ()
my_list = {}
my_list = []
my_list = ()[]
5.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which method adds an element to the end of a list?
insert()
append()
add()
extend()
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code?
my_list = [1, 2, 3, 4, 5]
print(my_list[2])
1
2
3
4
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How can you delete the element 30 from the list my_list = [10, 20, 30, 40, 50]?
my_list.remove(30)
my_list.delete(30)
my_list.pop(30)
my_list.erase(30)
8.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following will correctly retrieve the last element of the list my_list = [10, 20, 30, 40, 50]?
my_list[-1]
my_list[len(my_list)]
my_list[-0]
my_list[5]
Similar Resources on Wayground
12 questions
Python Quiz- 1.9

Quiz
•
University
10 questions
basic programming quiz

Quiz
•
University
10 questions
Digital Technologies

Quiz
•
University
10 questions
AFP Midtvejsevaluering

Quiz
•
University
10 questions
Project Training

Quiz
•
University
10 questions
Lists in python

Quiz
•
University
10 questions
H466 - Arrays, Records, Tuples and Lists

Quiz
•
11th Grade - University
13 questions
DS UNIT-2 TEST-2

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 Computers
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