
Python - List and Tuples
Authored by Sreelekshmi S
Computers
11th - 12th Grade
Used 264+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following piece of code when executed in Python shell?
>>> a=("Check")*3
>>> a
(‘Check’,’Check’,’Check’)
* Operator not valid for tuples
(‘CheckCheckCheck’)
Syntax error
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Is the following piece of code valid?
>>> a=(1,2,3,4)
>>> del a
No because tuple is immutable
Yes, the entire tuple is deleted
No, invalid syntax for del method
Yes, first element in the tuple is deleted
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What type of data is: a=[(1,1),(2,4),(3,9)]?
Array of tuples
List of tuples
Tuples of lists
Invalid type
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is true for a tuple?
Tup = 1,2,3
Tup = (""1,"2)
Tup = (1,2,3,4)
None of the above
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Result of the program above is
('1', '2', '3', '4', '5')
(1, 2, 3, 4, 5)
12345
"12345"
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Suppose you have the following tuple definition:
t = ('foo', 'bar', 'baz')
Which of the following statements replaces the second element ('bar') with the string 'qux':
t[1] = 'qux'
t(1) = 'qux'
t[1:1] = 'qux'
error
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
If list=[17,23,41,10] then list.append(32) will result
[32,17,23,41,10]
[17,23,41,10,32]
[10,17,23,32,41]
[41,32,23,17,10]
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
20 questions
SOFTWARE 7I
Quiz
•
7th Grade - University
20 questions
CSS - Operating System
Quiz
•
11th Grade
20 questions
Photoshop
Quiz
•
9th - 12th Grade
20 questions
Ulangan Harian Analisis Data 8C
Quiz
•
8th Grade - University
16 questions
ETİK BİLGİ VE SİBER SUÇLAR
Quiz
•
1st - 12th Grade
20 questions
Skill Competition Quiz 2024
Quiz
•
10th Grade - University
20 questions
Evaluación 2° Tecnología
Quiz
•
9th - 12th Grade
15 questions
Introducción Redes Tele1 IB
Quiz
•
10th Grade - University
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
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
20 questions
Figurative Language Review
Quiz
•
6th Grade