
tuples in python

Quiz
•
Computers
•
11th Grade
•
Medium
Kanika Ahluwalia
Used 48+ times
FREE Resource
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
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
Mashdemy 1-5 AI/ML

Quiz
•
9th - 12th Grade
15 questions
Перевод единиц измерения информации

Quiz
•
7th - 11th Grade
13 questions
Database Concepts - Introduction

Quiz
•
11th Grade
10 questions
Data structures, operators and variables

Quiz
•
9th - 12th Grade
20 questions
SQL Commands Part 1

Quiz
•
11th - 12th Grade
14 questions
ASK TINGKATAN 3 BAB 1

Quiz
•
9th Grade - University
20 questions
Documente Web. Formatul HTML

Quiz
•
9th Grade - University
14 questions
CSAwesome 3.6.1Equivalent Boolean Expressions

Quiz
•
9th - 12th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade