
Python Practice 5 - Tuple

Quiz
•
Other
•
Professional Development
•
Medium
Assoc.Prof,IT Chennai
Used 1+ times
FREE Resource
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”)
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
Bible Quiz

Quiz
•
Professional Development
12 questions
PSV

Quiz
•
Professional Development
13 questions
Disney Movies and Shows quiz! (REALLY EASY!)

Quiz
•
KG - Professional Dev...
15 questions
Bible Trivia

Quiz
•
Professional Development
11 questions
Bible Trivia Quiz

Quiz
•
8th Grade - Professio...
10 questions
Python Loop Statements

Quiz
•
Professional Development
15 questions
Practicing the verb TO BE

Quiz
•
Professional Development
9 questions
Python Functions

Quiz
•
Professional Development
Popular Resources on Wayground
18 questions
Writing Launch Day 1

Lesson
•
3rd Grade
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade