
Python_CSE-Quiz-2

Quiz
•
Computers
•
University
•
Medium
ANJALI JAIN
Used 1+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What will be the output of the following Python code?
a=[1,2,3,4,5,6,7,8,9]
print(a[::2])
[1,2]
[8,9]
[1,3,5,7,9]
[1,2,3]
2.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
The code below is manipulating a Python list using the slicing operator. What will be the output?
a=[1,2,3,4,5,6,7,8,9]
a[::2]=10,20,30,40,50,60
print(a)
valueError: attempt to assign a sequence of size 6 to an extended slice of size 5
[10, 2, 20, 4, 30, 6, 40, 8, 50, 60]
[1, 10, 3, 20, 5, 30, 7, 40, 9, 50, 60]
none
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What will be the output of the following code snippet?
a=[1,2,3,4,5]
print(a[3:0:-1])
Syntax error
[4, 3, 2]
[4, 3]
[4, 3, 2, 1]
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
def f(value, values):
v = 1
values[0] = 44
t = 3
v = [1, 2, 3]
f(t, v)
print(t, v[0])
1 44
31
3 44
11
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the correct command to shuffle the given Python list?
fruit.shuffle()
shuffle(fruit)
random.shuffle(fruit)
random.shuffleList(fruit)
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
arr = [[1, 2, 3, 4],
[4, 5, 6, 7],
[8, 9, 10, 11],
[12, 13, 14, 15]]
for i in range(0, 4):
print(arr[i].pop())
1 2 3 4
1 4 8 12
4 7 11 15
12,13,14,15
7.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Which of the following statements given below is/are true about a Python tuple?
Tuples have structure, and lists have an order
Tuples are homogeneous, and lists are heterogeneous
none
All of them.
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
Python Unit 3

Quiz
•
University
15 questions
Quiz Algoritma Looping

Quiz
•
University
10 questions
Post Test #4 - Python Fundamental #3

Quiz
•
University
12 questions
Quiz3

Quiz
•
University
12 questions
Python list starter

Quiz
•
10th Grade - University
10 questions
DS UNIT-2 TEST-3

Quiz
•
University
10 questions
Python Basics

Quiz
•
University
15 questions
Python функциялары 7 сынып

Quiz
•
12th Grade - University
Popular Resources on Wayground
10 questions
SR&R 2025-2026 Practice Quiz

Quiz
•
6th - 8th Grade
30 questions
Review of Grade Level Rules WJH

Quiz
•
6th - 8th Grade
6 questions
PRIDE in the Hallways and Bathrooms

Lesson
•
12th Grade
10 questions
Lab Safety Procedures and Guidelines

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

Quiz
•
3rd Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
15 questions
Subtracting Integers

Quiz
•
7th Grade
Discover more resources for Computers
15 questions
Let's Take a Poll...

Quiz
•
9th Grade - University
2 questions
Pronouncing Names Correctly

Quiz
•
University
34 questions
WH - Unit 2 Exam Review -B

Quiz
•
10th Grade - University
21 questions
Mapa países hispanohablantes

Quiz
•
1st Grade - University
10 questions
Transition Words

Quiz
•
University
5 questions
Theme

Interactive video
•
4th Grade - University
25 questions
Identifying Parts of Speech

Quiz
•
8th Grade - University
10 questions
Spanish Greetings and Goodbyes!

Lesson
•
6th Grade - University