
tuples in python
Authored by Kanika Ahluwalia
Computers
11th Grade
Used 51+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 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
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)
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:-1]
(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, 8, 9)
>>> for i in range(0, len(t), 2):
print(t[i])
[2,3,9]
[1,2,4,3,8,9]
[1,4,8]
Error
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?
>>>t1 = (1, 2, 4, 3)
>>>t2 = (1, 2, 3, 4)
>>>t1 < t2
True
False
Error
None
7.
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
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
Tarkie Seminar for Disers
Quiz
•
9th - 12th Grade
20 questions
Microsoft Excel
Quiz
•
KG - Professional Dev...
10 questions
python-BTxâu
Quiz
•
9th - 12th Grade
12 questions
HTML
Quiz
•
9th - 12th Grade
10 questions
conditional and iterative statements
Quiz
•
11th Grade
15 questions
ôn tập chỉnh ảnh và làm phim
Quiz
•
11th Grade
20 questions
Repaso TIC- 1º-bach
Quiz
•
11th Grade
20 questions
UH - 01 VII
Quiz
•
1st - 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
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