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
How to create a single element tuple
(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 Wayground
17 questions
HTML

Quiz
•
7th - 12th Grade
20 questions
คำสั่งพื้นฐานในภาษา Python (เก็บคะแนนครั้งที่ 2)

Quiz
•
12th Grade
10 questions
PI Mod 1 quiz

Quiz
•
9th - 12th Grade
15 questions
Python функциялары 7 сынып

Quiz
•
12th Grade - University
13 questions
HTML beginners quiz

Quiz
•
9th Grade - Professio...
10 questions
Data Types Quiz

Quiz
•
12th Grade
20 questions
Python Basics

Quiz
•
12th Grade
15 questions
HTML Quiz

Quiz
•
7th - 12th Grade
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
20 questions
Digital Citizenship

Quiz
•
8th - 12th Grade
35 questions
Computer Baseline Examination 2025-26

Quiz
•
9th - 12th Grade
13 questions
Problem Solving Process

Quiz
•
9th - 12th Grade
10 questions
Understanding Algorithms with Pseudocode and Flowcharts

Interactive video
•
9th - 12th Grade
19 questions
AP CSP Unit 1 Review (code.org)

Quiz
•
10th - 12th Grade