How to create a single element tuple
Python Quiz

Quiz
•
Computers
•
12th Grade
•
Medium
Sarika Kaushal
Used 29+ times
FREE Resource
15 questions
Show all answers
1.
MULTIPLE SELECT QUESTION
30 sec • 1 pt
(1,)
(1)
{1}
[1]
tuple([1])
2.
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"
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the “hello” +1+2+3?
hello123
hello
hello6
Error
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following Python code?
print("xyyzxyzxzxyy".count('yy'))
2
0
5
Error
5.
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))
6.
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)
7.
MULTIPLE SELECT QUESTION
30 sec • 1 pt
Assume the following list definition:
>>> a = ['foo', 'bar', 'baz', 'qux', 'quux', 'corge']
Several short REPL sessions are shown below. Which display correct output?
>>> print(a[-6])
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
IndexError: list index out of range
>>> a[:] is a
True
>>> print(a[4::-2])
['quux', 'baz', 'foo']
>>> print(a[-5:-3])
['bar', 'baz']
>>> max(a[2:4] + ['grault'])
'qux'
Create a free account and access millions of resources
Similar Resources on Quizizz
16 questions
Python basics

Quiz
•
9th - 12th Grade
11 questions
Python Boolean

Quiz
•
11th - 12th Grade
15 questions
Python Lists

Quiz
•
10th - 12th Grade
20 questions
Python Basics Review (TSK)

Quiz
•
9th - 12th Grade
15 questions
ASK F2 -KOD ARAHAN (PYTHON)

Quiz
•
1st Grade - University
18 questions
Computer Science LISTS

Quiz
•
12th Grade
10 questions
Python lists and tuples

Quiz
•
12th Grade
15 questions
Python Revision Tour - I

Quiz
•
12th Grade
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade
Discover more resources for Computers
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
20 questions
Taxes

Quiz
•
9th - 12th Grade
17 questions
Parts of Speech

Quiz
•
7th - 12th Grade
20 questions
Chapter 3 - Making a Good Impression

Quiz
•
9th - 12th Grade
20 questions
Inequalities Graphing

Quiz
•
9th - 12th Grade
10 questions
Identifying equations

Quiz
•
KG - University