
List
Authored by Dhilma Dhilma
Computers
12th Grade
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
7 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following Python code?
names = ['Amir', 'Bear', 'Charlton', 'Daman']
print(names[-1][-1])
A
Daman
n
Amir
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following Python code?
11
12
21
22
Answer explanation
When assigning names1 to names2, we create a second reference to the same list. Changes to names2 affect names1. When assigning the slice of all elements in names1 to names3, we are creating a full copy of names1 which can be modified independently.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Suppose list1 is [1, 3, 2],
What is list1 * 2?
[2, 6, 4]
[1, 3, 2, 1, 3]
[1, 3, 2, 1, 3, 2]
[1, 3, 2, 3, 2, 1]
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Suppose list1 = [0.5 * x for x in range(0, 4)],
list1 is:
[0, 1, 2, 3]
[0, 1, 2, 3, 4]
[0.0, 0.5, 1.0, 1.5]
[0.0, 0.5, 1.0, 1.5, 2.0]
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
To insert 5 to the third item in list1, we use which command?
list1.insert(3, 5)
list1.insert(2, 5)
list1.add(3, 5)
list1.insert(5, 2)
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Suppose listExample is [3, 4, 5, 20, 5, 25, 1, 3],
what is list1 after listExample.pop(1)?
[3, 4, 5, 20, 5, 25, 1, 3]
[3, 4, 5, 20, 5, 25, 1]
[3, 5, 20, 5, 25, 1, 3]
[4, 5, 20, 5, 25, 1, 3]
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following Python code?
list("a#b#c#d".split('#'))
[‘a’, ‘b’, ‘c’, ‘d’]
[‘a b c d’]
[‘a#b#c#d’]
[‘abcd’]
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?
Similar Resources on Wayground
10 questions
KRIPTOGRAFI DALAM PENGKOMPUTERAN
Quiz
•
10th - 12th Grade
11 questions
Packet Switching and Encryption
Quiz
•
10th - 12th Grade
11 questions
Arduino - Contador
Quiz
•
9th Grade - University
10 questions
HTML & Google Site Seatwork
Quiz
•
12th Grade
10 questions
Recursion Practice, Recursion Practice, Recursion Practice...
Quiz
•
10th Grade - University
10 questions
1.1 - System Architecture - CPU [OCR] [GCSE]
Quiz
•
9th - 12th Grade
10 questions
Interfejsy USB i bezprzewodowe oraz urządzenia wskazujące i
Quiz
•
9th - 12th Grade
10 questions
مراجعة الوحدة 3 ( البرمجة بواسطة المايكروبت )
Quiz
•
12th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade