
Python Practice 5 - Tuple
Authored by Assoc.Prof,IT Chennai
Other
Professional Development
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which of the following is a Python tuple?
[1, 2, 3]
(1, 2, 3)
{1, 2, 3}
{}
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Suppose t = (1, 2, 4, 3), which of the following is incorrect?
print(t[3])
t[3] = 45
print(max(t))
print(len(t))
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following Python code?
>>>t=(1,2,4,3)
>>>t[1:3]
(1, 2)
(1, 2, 4)
(2, 4)
(2, 4, 3)
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following Python code?
>>>t=(1,2,4,3)
>>>t[1:-1]
(1, 2)
(1, 2, 4)
(2, 4)
(2, 4, 3)
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following Python code?
>>>t = (1, 2)
>>>2 * t
(1, 2, 1, 2)
[1, 2, 1, 2]
(1, 1, 2, 2)
[1, 1, 2, 2]
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following Python code?
>>>my_tuple = (1, 2, 3, 4)
>>>my_tuple.append( (5, 6, 7) )
>>>print len(my_tuple)
1
2
5
Error
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following Python code snippet?
d = {"john":40, "peter":45}
print(d)
“john”, 40, “peter”, 45
{‘john’: 40, ‘peter’: 45}
40 and 45
d = (40:”john”, 45:”peter”)
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
¿cuanto conoces a los youtubers?
Quiz
•
Professional Development
10 questions
RAT WILMAR 2024
Quiz
•
Professional Development
15 questions
THI NGHỊ QUYẾT ĐẠI HỘI ĐOÀN
Quiz
•
Professional Development
10 questions
MINECRAFT JAVA (bardzo trudne)
Quiz
•
1st Grade - Professio...
14 questions
OB 4-11-2023
Quiz
•
Professional Development
10 questions
Annual Training FY2023
Quiz
•
Professional Development
10 questions
HEM Chapter 1
Quiz
•
Professional Development
15 questions
UTAR Industrial Session
Quiz
•
University - Professi...
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
Discover more resources for Other
10 questions
How to Email your Teacher
Quiz
•
Professional Development
6 questions
3RD GRADE DECLARATION OF INDEPENDENCE EXIT TICKET
Quiz
•
Professional Development
19 questions
Black History Month Trivia
Quiz
•
6th Grade - Professio...
22 questions
Multiplying Exponents with the Same Base
Quiz
•
9th Grade - Professio...
40 questions
Flags of the World
Quiz
•
KG - Professional Dev...