SlideShare a Scribd company logo
Question 1
A Python list is .. set of items.
an unordered
an ordered
a limited
an integer
Question 2
Which is a valid Python statement?
alist = [1; 4; 9; 16]
alist = 1: 2: 3: 4]
alist = [1, 4, 9, 16]
Question 3
A Python list's items can be any Python type.
True
False
Question 4
If squares = [1, 4, 9, 16], what is the value of squares(1] ?
an error
1
4
5
Question 5
If squares = [1, 4, 9, 16, 25], what is len(squares)?
4
55
5
1
Question 6
The following statement is valid:
alist = [ ]
True
False
Question 7
What is the output of the following program:
alist = []
for i in range(3):
alist.append(i**2)
print(alist)
[1, 4, 16]
[ ]
[0,1,4]
9
Question 8
What is the output of the following:
alist = [1, 4, 9]
sum = 0
for value in alist:
sum += value
print(sum)
[1, 5, 14]
0
14
[1, 4, 9]
Question 9
If squares = [1, 4, 9, 16, 25], what is the value of squares[1:3] ?
[4,91
[4, 9, 16]
[1,4]
[1, 4, 9]
Question 10
If squares = [1, 4, 9, 16, 25], what is the value of squares[:3] ?
[1, 4, 9, 16]
an error
[1, 4, 9]
Question 11
If squares = [1, 4, 9, 16, 25], what is the value of squares[2:]?
[4,9, 16, 25]
an error
[1. 41
[9, 16, 25]
Question 12
If squares = [1, 4, 9, 16, 25], what is the value of squares[0::2] ?
[1, 4]
an error
[1, 9, 25]
[1, 4, 9]
Question 13
What function can be used to determine the smallest value in a list?
smallest()
min()
least()
minimum()
Question 14
Which keyword is used to determine if a value is in a list?
contains
in
has
within
Question 15
Assuming alist is a list of 4 items, what does this statement do:
alist[11 = 2
Insert two items into the list at position 1
Change alist's second item to 2
Change alist's first item to 2
Insert an item in a list at position 1 with value 2
Question 16
Which statement can be used to insert an item into a list named alist?
alist.insert(item, O)
insert(alist, item)
alist.insert(O, item)
alist <- item
Question 17
What method can be used to append a list to the end of another list?
augment()
extend()
concatenate()
add()
Question 18
Assuming the list squares is set to [1, 4, 9, 16], what statement can be
used to remove the value 1 from the list
del alist.0
alist.remove(1)
remove(alist, 1)
remove(alist, O)
Ouestion 19
Assuming alist is a list with 4 items, what statement can be used to
remove the last item from alist and assignment the variable last to its
value?
last = alist.pop()
last = alist.drop()
last = alist[-1]
last = alist[0]
Question 20
What statement can be used to remove all items from a list named alist?
delete alist
alist.clear()
del alist
clear(alist)
Question 21
What statement can be used to remove the first item from a list named
alist?
remove(alist, 0)
alist.remove(O)
del alist[O]
del(alist, O)
Question 22
If alist is a list, what method can be used to create a new list with a copy
of the items contained in alist?
blist = alist.dup()
blist = alist
copy(alist, blist)
blist = alist.copy()
Question 23
If alist is a list, what does sorted(alist) do?
generates a new ordered list
checks if alist is sorted, and return True or False
returns the index of the first item out of order
updates alist so that its items are in order
Question 24
If alist is a list, what does alist.sort( do?
checks if alist is sorted =, and return True or False
generates a new ordered list
updates alist so that its items are in order
returns the index of the first item out of order
Question 25
If alist is a list, what does alist.reverse do?
generates a new list in reverse order
checks if alist is reverse sorted, and return True or False
updates alist so that its items are in reverse order
returns the index of the first item out of order
Question 26
A table can be represented as a list of lists.
True
False
Question 27
After a tuple is created, its items can be changed.
True
False
Question 28
Which can be used to create a tuple?
square brackets
curly braces
colons
parentheses
Question 29
A tuple's items can be access by square brackets, similar to lists.
True
False

More Related Content

Similar to Question 1A Python list is ��.. set of items.an unorderedan or.pdf

Bca ii dfs u-2 linklist,stack,queue
Bca ii  dfs u-2 linklist,stack,queueBca ii  dfs u-2 linklist,stack,queue
Bca ii dfs u-2 linklist,stack,queue
Rai University
 
Bsc cs ii dfs u-2 linklist,stack,queue
Bsc cs ii  dfs u-2 linklist,stack,queueBsc cs ii  dfs u-2 linklist,stack,queue
Bsc cs ii dfs u-2 linklist,stack,queue
Rai University
 
Data structures & algorithms lecture 3
Data structures & algorithms lecture 3Data structures & algorithms lecture 3
Data structures & algorithms lecture 3
Poojith Chowdhary
 
Mca ii dfs u-3 linklist,stack,queue
Mca ii dfs u-3 linklist,stack,queueMca ii dfs u-3 linklist,stack,queue
Mca ii dfs u-3 linklist,stack,queue
Rai University
 
Prompt Your task is to create a connected list implementation and .pdf
Prompt Your task is to create a connected list implementation and .pdfPrompt Your task is to create a connected list implementation and .pdf
Prompt Your task is to create a connected list implementation and .pdf
alsofshionchennai
 
Lists
Lists Lists
Lists
abdullah619
 
Python PRACTICAL NO 6 for your Assignment.pptx
Python PRACTICAL NO 6 for your Assignment.pptxPython PRACTICAL NO 6 for your Assignment.pptx
Python PRACTICAL NO 6 for your Assignment.pptx
NeyXmarXd
 
Data Structures and Agorithm: DS 02 Array List.pptx
Data Structures and Agorithm: DS 02 Array List.pptxData Structures and Agorithm: DS 02 Array List.pptx
Data Structures and Agorithm: DS 02 Array List.pptx
RashidFaridChishti
 
data structures and algorithms Unit 3
data structures and algorithms Unit 3data structures and algorithms Unit 3
data structures and algorithms Unit 3
infanciaj
 
Chapter 15 Lists
Chapter 15 ListsChapter 15 Lists
Chapter 15 Lists
Praveen M Jigajinni
 
Lecture2.pptx
Lecture2.pptxLecture2.pptx
Lecture2.pptx
Sakith1
 
07 java collection
07 java collection07 java collection
07 java collection
Abhishek Khune
 
Can you help me by answering this- The following function defined in c.pdf
Can you help me by answering this- The following function defined in c.pdfCan you help me by answering this- The following function defined in c.pdf
Can you help me by answering this- The following function defined in c.pdf
SeanIC4Jamesn
 
Stacks,queues,linked-list
Stacks,queues,linked-listStacks,queues,linked-list
Stacks,queues,linked-list
pinakspatel
 
The Ring programming language version 1.5.3 book - Part 22 of 184
The Ring programming language version 1.5.3 book - Part 22 of 184The Ring programming language version 1.5.3 book - Part 22 of 184
The Ring programming language version 1.5.3 book - Part 22 of 184
Mahmoud Samir Fayed
 
There are a couple of new methods that you will be writing for this pr.pdf
There are a couple of new methods that you will be writing for this pr.pdfThere are a couple of new methods that you will be writing for this pr.pdf
There are a couple of new methods that you will be writing for this pr.pdf
aamousnowov
 
The Ring programming language version 1.6 book - Part 24 of 189
The Ring programming language version 1.6 book - Part 24 of 189The Ring programming language version 1.6 book - Part 24 of 189
The Ring programming language version 1.6 book - Part 24 of 189
Mahmoud Samir Fayed
 
Built-in Data Structures in python 3.pdf
Built-in Data Structures in python 3.pdfBuilt-in Data Structures in python 3.pdf
Built-in Data Structures in python 3.pdf
alivaisi1
 
Introduction To Programming with Python-4
Introduction To Programming with Python-4Introduction To Programming with Python-4
Introduction To Programming with Python-4
Syed Farjad Zia Zaidi
 

Similar to Question 1A Python list is ��.. set of items.an unorderedan or.pdf (20)

Bca ii dfs u-2 linklist,stack,queue
Bca ii  dfs u-2 linklist,stack,queueBca ii  dfs u-2 linklist,stack,queue
Bca ii dfs u-2 linklist,stack,queue
 
Bsc cs ii dfs u-2 linklist,stack,queue
Bsc cs ii  dfs u-2 linklist,stack,queueBsc cs ii  dfs u-2 linklist,stack,queue
Bsc cs ii dfs u-2 linklist,stack,queue
 
Data structures & algorithms lecture 3
Data structures & algorithms lecture 3Data structures & algorithms lecture 3
Data structures & algorithms lecture 3
 
Mca ii dfs u-3 linklist,stack,queue
Mca ii dfs u-3 linklist,stack,queueMca ii dfs u-3 linklist,stack,queue
Mca ii dfs u-3 linklist,stack,queue
 
Prompt Your task is to create a connected list implementation and .pdf
Prompt Your task is to create a connected list implementation and .pdfPrompt Your task is to create a connected list implementation and .pdf
Prompt Your task is to create a connected list implementation and .pdf
 
Lists
Lists Lists
Lists
 
Python PRACTICAL NO 6 for your Assignment.pptx
Python PRACTICAL NO 6 for your Assignment.pptxPython PRACTICAL NO 6 for your Assignment.pptx
Python PRACTICAL NO 6 for your Assignment.pptx
 
Data Structures and Agorithm: DS 02 Array List.pptx
Data Structures and Agorithm: DS 02 Array List.pptxData Structures and Agorithm: DS 02 Array List.pptx
Data Structures and Agorithm: DS 02 Array List.pptx
 
data structures and algorithms Unit 3
data structures and algorithms Unit 3data structures and algorithms Unit 3
data structures and algorithms Unit 3
 
Chapter 15 Lists
Chapter 15 ListsChapter 15 Lists
Chapter 15 Lists
 
Lecture2.pptx
Lecture2.pptxLecture2.pptx
Lecture2.pptx
 
07 java collection
07 java collection07 java collection
07 java collection
 
Can you help me by answering this- The following function defined in c.pdf
Can you help me by answering this- The following function defined in c.pdfCan you help me by answering this- The following function defined in c.pdf
Can you help me by answering this- The following function defined in c.pdf
 
Stacks,queues,linked-list
Stacks,queues,linked-listStacks,queues,linked-list
Stacks,queues,linked-list
 
The Ring programming language version 1.5.3 book - Part 22 of 184
The Ring programming language version 1.5.3 book - Part 22 of 184The Ring programming language version 1.5.3 book - Part 22 of 184
The Ring programming language version 1.5.3 book - Part 22 of 184
 
There are a couple of new methods that you will be writing for this pr.pdf
There are a couple of new methods that you will be writing for this pr.pdfThere are a couple of new methods that you will be writing for this pr.pdf
There are a couple of new methods that you will be writing for this pr.pdf
 
1 D Arrays in C++
1 D Arrays in C++1 D Arrays in C++
1 D Arrays in C++
 
The Ring programming language version 1.6 book - Part 24 of 189
The Ring programming language version 1.6 book - Part 24 of 189The Ring programming language version 1.6 book - Part 24 of 189
The Ring programming language version 1.6 book - Part 24 of 189
 
Built-in Data Structures in python 3.pdf
Built-in Data Structures in python 3.pdfBuilt-in Data Structures in python 3.pdf
Built-in Data Structures in python 3.pdf
 
Introduction To Programming with Python-4
Introduction To Programming with Python-4Introduction To Programming with Python-4
Introduction To Programming with Python-4
 

More from climatecontrolsv

Required is a project that seeks to develop a program that check.pdf
Required is a project that seeks to develop a program that check.pdfRequired is a project that seeks to develop a program that check.pdf
Required is a project that seeks to develop a program that check.pdf
climatecontrolsv
 
Question 1A Python list isset of items.an unorderedan ordere.pdf
Question 1A Python list isset of items.an unorderedan ordere.pdfQuestion 1A Python list isset of items.an unorderedan ordere.pdf
Question 1A Python list isset of items.an unorderedan ordere.pdf
climatecontrolsv
 
PROBLEM STATEMENTIn this assignment, you will complete DoubleEnde.pdf
PROBLEM STATEMENTIn this assignment, you will complete DoubleEnde.pdfPROBLEM STATEMENTIn this assignment, you will complete DoubleEnde.pdf
PROBLEM STATEMENTIn this assignment, you will complete DoubleEnde.pdf
climatecontrolsv
 
Principles of Insurance Chapter 3 Exercise 1 Name of student Regist.pdf
Principles of Insurance Chapter 3 Exercise 1 Name of student Regist.pdfPrinciples of Insurance Chapter 3 Exercise 1 Name of student Regist.pdf
Principles of Insurance Chapter 3 Exercise 1 Name of student Regist.pdf
climatecontrolsv
 
Please use R studiodata13.txtX Y7.04948502035051 4.37962324700.pdf
Please use R studiodata13.txtX Y7.04948502035051 4.37962324700.pdfPlease use R studiodata13.txtX Y7.04948502035051 4.37962324700.pdf
Please use R studiodata13.txtX Y7.04948502035051 4.37962324700.pdf
climatecontrolsv
 
Please help me what is the best answer for this. (Organizational Beh.pdf
Please help me what is the best answer for this. (Organizational Beh.pdfPlease help me what is the best answer for this. (Organizational Beh.pdf
Please help me what is the best answer for this. (Organizational Beh.pdf
climatecontrolsv
 
Please help this code is supposed to evaluate current node state and i.pdf
Please help this code is supposed to evaluate current node state and i.pdfPlease help this code is supposed to evaluate current node state and i.pdf
Please help this code is supposed to evaluate current node state and i.pdf
climatecontrolsv
 
Please IRAC this brief. Terrance and Barbara Moser were married on O.pdf
Please IRAC this brief. Terrance and Barbara Moser were married on O.pdfPlease IRAC this brief. Terrance and Barbara Moser were married on O.pdf
Please IRAC this brief. Terrance and Barbara Moser were married on O.pdf
climatecontrolsv
 
Please help me fix this code! will upvote. The code needs to produce .pdf
Please help me fix this code! will upvote.  The code needs to produce .pdfPlease help me fix this code! will upvote.  The code needs to produce .pdf
Please help me fix this code! will upvote. The code needs to produce .pdf
climatecontrolsv
 
PART 1Net present value represents the difference between the pres.pdf
PART 1Net present value represents the difference between the pres.pdfPART 1Net present value represents the difference between the pres.pdf
PART 1Net present value represents the difference between the pres.pdf
climatecontrolsv
 
Please create a context diagram of the following housing system Y.pdf
Please create a context diagram of the following housing system Y.pdfPlease create a context diagram of the following housing system Y.pdf
Please create a context diagram of the following housing system Y.pdf
climatecontrolsv
 

More from climatecontrolsv (11)

Required is a project that seeks to develop a program that check.pdf
Required is a project that seeks to develop a program that check.pdfRequired is a project that seeks to develop a program that check.pdf
Required is a project that seeks to develop a program that check.pdf
 
Question 1A Python list isset of items.an unorderedan ordere.pdf
Question 1A Python list isset of items.an unorderedan ordere.pdfQuestion 1A Python list isset of items.an unorderedan ordere.pdf
Question 1A Python list isset of items.an unorderedan ordere.pdf
 
PROBLEM STATEMENTIn this assignment, you will complete DoubleEnde.pdf
PROBLEM STATEMENTIn this assignment, you will complete DoubleEnde.pdfPROBLEM STATEMENTIn this assignment, you will complete DoubleEnde.pdf
PROBLEM STATEMENTIn this assignment, you will complete DoubleEnde.pdf
 
Principles of Insurance Chapter 3 Exercise 1 Name of student Regist.pdf
Principles of Insurance Chapter 3 Exercise 1 Name of student Regist.pdfPrinciples of Insurance Chapter 3 Exercise 1 Name of student Regist.pdf
Principles of Insurance Chapter 3 Exercise 1 Name of student Regist.pdf
 
Please use R studiodata13.txtX Y7.04948502035051 4.37962324700.pdf
Please use R studiodata13.txtX Y7.04948502035051 4.37962324700.pdfPlease use R studiodata13.txtX Y7.04948502035051 4.37962324700.pdf
Please use R studiodata13.txtX Y7.04948502035051 4.37962324700.pdf
 
Please help me what is the best answer for this. (Organizational Beh.pdf
Please help me what is the best answer for this. (Organizational Beh.pdfPlease help me what is the best answer for this. (Organizational Beh.pdf
Please help me what is the best answer for this. (Organizational Beh.pdf
 
Please help this code is supposed to evaluate current node state and i.pdf
Please help this code is supposed to evaluate current node state and i.pdfPlease help this code is supposed to evaluate current node state and i.pdf
Please help this code is supposed to evaluate current node state and i.pdf
 
Please IRAC this brief. Terrance and Barbara Moser were married on O.pdf
Please IRAC this brief. Terrance and Barbara Moser were married on O.pdfPlease IRAC this brief. Terrance and Barbara Moser were married on O.pdf
Please IRAC this brief. Terrance and Barbara Moser were married on O.pdf
 
Please help me fix this code! will upvote. The code needs to produce .pdf
Please help me fix this code! will upvote.  The code needs to produce .pdfPlease help me fix this code! will upvote.  The code needs to produce .pdf
Please help me fix this code! will upvote. The code needs to produce .pdf
 
PART 1Net present value represents the difference between the pres.pdf
PART 1Net present value represents the difference between the pres.pdfPART 1Net present value represents the difference between the pres.pdf
PART 1Net present value represents the difference between the pres.pdf
 
Please create a context diagram of the following housing system Y.pdf
Please create a context diagram of the following housing system Y.pdfPlease create a context diagram of the following housing system Y.pdf
Please create a context diagram of the following housing system Y.pdf
 

Recently uploaded

Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
Jheel Barad
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
GeoBlogs
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
timhan337
 
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Po-Chuan Chen
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
Anna Sz.
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
joachimlavalley1
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
Peter Windle
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
CarlosHernanMontoyab2
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
EduSkills OECD
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 

Recently uploaded (20)

Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
 
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 

Question 1A Python list is ��.. set of items.an unorderedan or.pdf

  • 1. Question 1 A Python list is .. set of items. an unordered an ordered a limited an integer Question 2 Which is a valid Python statement? alist = [1; 4; 9; 16] alist = 1: 2: 3: 4] alist = [1, 4, 9, 16] Question 3 A Python list's items can be any Python type. True False Question 4 If squares = [1, 4, 9, 16], what is the value of squares(1] ? an error 1 4 5 Question 5 If squares = [1, 4, 9, 16, 25], what is len(squares)? 4 55 5 1 Question 6 The following statement is valid: alist = [ ]
  • 2. True False Question 7 What is the output of the following program: alist = [] for i in range(3): alist.append(i**2) print(alist) [1, 4, 16] [ ] [0,1,4] 9 Question 8 What is the output of the following: alist = [1, 4, 9] sum = 0 for value in alist: sum += value print(sum) [1, 5, 14] 0 14 [1, 4, 9] Question 9 If squares = [1, 4, 9, 16, 25], what is the value of squares[1:3] ? [4,91 [4, 9, 16] [1,4] [1, 4, 9] Question 10 If squares = [1, 4, 9, 16, 25], what is the value of squares[:3] ? [1, 4, 9, 16]
  • 3. an error [1, 4, 9] Question 11 If squares = [1, 4, 9, 16, 25], what is the value of squares[2:]? [4,9, 16, 25] an error [1. 41 [9, 16, 25] Question 12 If squares = [1, 4, 9, 16, 25], what is the value of squares[0::2] ? [1, 4] an error [1, 9, 25] [1, 4, 9] Question 13 What function can be used to determine the smallest value in a list? smallest() min() least() minimum() Question 14 Which keyword is used to determine if a value is in a list? contains in has within Question 15 Assuming alist is a list of 4 items, what does this statement do: alist[11 = 2 Insert two items into the list at position 1 Change alist's second item to 2
  • 4. Change alist's first item to 2 Insert an item in a list at position 1 with value 2 Question 16 Which statement can be used to insert an item into a list named alist? alist.insert(item, O) insert(alist, item) alist.insert(O, item) alist <- item Question 17 What method can be used to append a list to the end of another list? augment() extend() concatenate() add() Question 18 Assuming the list squares is set to [1, 4, 9, 16], what statement can be used to remove the value 1 from the list del alist.0 alist.remove(1) remove(alist, 1) remove(alist, O) Ouestion 19 Assuming alist is a list with 4 items, what statement can be used to remove the last item from alist and assignment the variable last to its value? last = alist.pop() last = alist.drop() last = alist[-1] last = alist[0]
  • 5. Question 20 What statement can be used to remove all items from a list named alist? delete alist alist.clear() del alist clear(alist) Question 21 What statement can be used to remove the first item from a list named alist? remove(alist, 0) alist.remove(O) del alist[O] del(alist, O) Question 22 If alist is a list, what method can be used to create a new list with a copy of the items contained in alist? blist = alist.dup() blist = alist copy(alist, blist) blist = alist.copy() Question 23 If alist is a list, what does sorted(alist) do? generates a new ordered list checks if alist is sorted, and return True or False returns the index of the first item out of order updates alist so that its items are in order Question 24 If alist is a list, what does alist.sort( do? checks if alist is sorted =, and return True or False generates a new ordered list updates alist so that its items are in order returns the index of the first item out of order
  • 6. Question 25 If alist is a list, what does alist.reverse do? generates a new list in reverse order checks if alist is reverse sorted, and return True or False updates alist so that its items are in reverse order returns the index of the first item out of order Question 26 A table can be represented as a list of lists. True False Question 27 After a tuple is created, its items can be changed. True False Question 28 Which can be used to create a tuple? square brackets curly braces colons parentheses Question 29 A tuple's items can be access by square brackets, similar to lists. True False