
PP_Week7_Batch1

Quiz
•
Computers
•
University
•
Hard
Narasimha Reddy Soora
Used 2+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Choose the correct option with respect to Python.
Both tuples and lists are immutable.
Tuples are immutable while lists are mutable.
Both tuples and lists are mutable.
Tuples are mutable while lists are immutable.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of below Python code?
tuple1=(5,1,7,6,2)
tuple1.pop(2)
print(tuple1)
(5,1,6,2)
(5,1,7,6)
(5,1,7,6,2)
Error
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of below Python code?
tupl=("annie","hena","sid")
print(tupl[-3:0])
("annie")
()
None
Error as slicing is not possible in tuple.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of below Python code?
tupl=([2,3],"abc",0,9)
tupl[0][1]=1
print(tupl)
([2,3],"abc",0,9)
([1,3],"abc",0,9)
([2,1],"abc",0,9)
Error
5.
MULTIPLE SELECT QUESTION
30 sec • 1 pt
Which of the following are true of Python lists?
A list may contain any type of object except another list
A given object may appear in a list more than once
All elements in a list must be of the same type
These represent the same list:
['a', 'b', 'c']
['c', 'a', 'b']
There is no conceptual limit to the size of a list
6.
MULTIPLE SELECT QUESTION
20 sec • 1 pt
List a is defined as follows:
a = [1, 2, 3, 4, 5]
Select all of the following statements that remove the middle element 3 from a so that it equals [1, 2, 4, 5]:
a[2:3] = []
a[2] = []
a.remove(3)
a[2:2] = []
del a[2]
7.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Consider this assignment statement:
a, b, c = (1, 2, 3, 4, 5, 6, 7, 8, 9)[1::3]
Following execution of this statement, what is the value of b:
5
4
3
6
7
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
Introducción a Python - Clase 8

Quiz
•
University
10 questions
TIU Quiz-9

Quiz
•
University
10 questions
CSE 6R Midterm Review

Quiz
•
University
15 questions
Py-Hackathon - Week 2 - Day 2

Quiz
•
University
15 questions
Тест з програмування на Python

Quiz
•
12th Grade - University
10 questions
PYTHON PROGRAMMING

Quiz
•
University
10 questions
Data Science Basics

Quiz
•
University
10 questions
Python Dictionaries

Quiz
•
University
Popular Resources on Wayground
50 questions
Trivia 7/25

Quiz
•
12th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade