Home
Explore
Exams
Login
Get started
Home
Python Exam 2 Conceptual Review Session
Python Exam 2 Conceptual Review Session
0.0
(0)
Rate it
Studied by 2 people
0.0
(0)
Rate it
Call with Kai
Learn
Practice Test
Spaced Repetition
Match
Flashcards
Knowt Play
Card Sorting
1/32
There's no tags or description
Looks like no tags are added yet.
All Modes
Learn
Practice Test
Matching
Spaced Repetition
Call with Kai
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
No study sessions yet.
33 Terms
View all (33)
Star these 33
1
New cards
What method can be called on a list to add an item?
.append()
2
New cards
Which datatype is accessed with the .items() method?
dict
3
New cards
What characteristic means that elements can be changed in a datatype?
Mutable
4
New cards
Are tuples indexed?
YES
5
New cards
Which datatype is known to be ordered?
List
6
New cards
What method counts the occurrences of an item in a tuple?
.count(item)
7
New cards
What will myList[0] return if myList = [1,2,3]?
1
8
New cards
Are dictionary keys mutable?
NO
9
New cards
How do you access a value in a dictionary?
By using the key, e.g., myDict[key]
10
New cards
What method can be called on a string to remove whitespace?
.strip(chars)
11
New cards
What does the .split() method do in Python?
Splits a string into a list based on a separator.
12
New cards
What will be the return value of sorted() when a list is passed?
A sorted list without modifying the original.
13
New cards
How do you check if an item is in a list?
Using the 'in' keyword.
14
New cards
What is the primary way to add an item to a list?
.append()
15
New cards
What is the output of the statement myList.reverse()?
None; it modifies the original list.
16
New cards
What occurs if you attempt to call index on a value not found in a list?
An error is thrown.
17
New cards
Are dictionary values mutable?
YES
18
New cards
What does tuple unpacking allow you to do?
Assign variables to values directly from a tuple.
19
New cards
What will 'del myList[0]' do?
Delete the first element of myList.
20
New cards
What does the random module's .random() function return?
A random float between [0,1).
21
New cards
Which method returns the index of an item in a tuple?
.index(item)
22
New cards
What happens in tuple packing?
Values are packed into the tuple.
23
New cards
How are dictionaries used to count letter occurrences?
By incrementing the count for each letter in a looping structure.
24
New cards
What is the significance of using the import statement before a module?
It allows access to the functions and variables defined in that module.
25
New cards
What happens when you try to add duplicate keys to a dictionary?
Only the last assignment to the key will be kept.
26
New cards
What is unique about the elements in a dictionary?
Keys must be unique.
27
New cards
What is a key characteristic of lists in Python?
They are mutable.
28
New cards
What will myTuple[0] return if myTuple = (1,2,3)?
1
29
New cards
What does the range function return?
A sequence of numbers in a specified range.
30
New cards
To mutate items in a tuple, what must be done?
You must create a new tuple.
31
New cards
What is the purpose of the .replace() method in strings?
To return a new string with specified substrings replaced.
32
New cards
What are the characteristics of a dictionary?
Keys are unique and values can be mutable.
33
New cards
How to check if two items are identical?
Use '==' operator.
Explore top notes
Situation Ethics
Updated 1174d ago
Note
Preview
Thinking
Updated 421d ago
Note
Preview
4.1: Imperfect Competition
Updated 649d ago
Note
Preview
BY11 - MODULE 1: Cells as the Basis of Life
Updated 546d ago
Note
Preview
Chemistry Chapter 7 and 20 Vocabulary
Updated 1174d ago
Note
Preview
PERIOD 2 - AP US History (1607-1750) - THE AMERICAN PAGEANT 16th EDITION (AP EDITION)
Updated 1675d ago
Note
Preview
Vocabulary- Body Parts and Miscellaneous Medical Terms
Updated 1191d ago
Note
Preview
AP Calculus: Alternating Series Error Bound Theorem
Updated 411d ago
Note
Preview
Situation Ethics
Updated 1174d ago
Note
Preview
Thinking
Updated 421d ago
Note
Preview
4.1: Imperfect Competition
Updated 649d ago
Note
Preview
BY11 - MODULE 1: Cells as the Basis of Life
Updated 546d ago
Note
Preview
Chemistry Chapter 7 and 20 Vocabulary
Updated 1174d ago
Note
Preview
PERIOD 2 - AP US History (1607-1750) - THE AMERICAN PAGEANT 16th EDITION (AP EDITION)
Updated 1675d ago
Note
Preview
Vocabulary- Body Parts and Miscellaneous Medical Terms
Updated 1191d ago
Note
Preview
AP Calculus: Alternating Series Error Bound Theorem
Updated 411d ago
Note
Preview
Explore top flashcards
Level H Unit 7
Updated 1152d ago
Flashcards (20)
Preview
End of the year vocabulary
Updated 263d ago
Flashcards (30)
Preview
General
Updated 250d ago
Flashcards (77)
Preview
deca finance cluster exam vocabulary
Updated 1164d ago
Flashcards (100)
Preview
CME 111 Structure to memorize for final
Updated 416d ago
Flashcards (40)
Preview
Unite 3: les achats/le voyage
Updated 1173d ago
Flashcards (81)
Preview
1AA3 - WEEK 7
Updated 664d ago
Flashcards (20)
Preview
HOSA Dental Science Written Exam
Updated 1155d ago
Flashcards (297)
Preview
Level H Unit 7
Updated 1152d ago
Flashcards (20)
Preview
End of the year vocabulary
Updated 263d ago
Flashcards (30)
Preview
General
Updated 250d ago
Flashcards (77)
Preview
deca finance cluster exam vocabulary
Updated 1164d ago
Flashcards (100)
Preview
CME 111 Structure to memorize for final
Updated 416d ago
Flashcards (40)
Preview
Unite 3: les achats/le voyage
Updated 1173d ago
Flashcards (81)
Preview
1AA3 - WEEK 7
Updated 664d ago
Flashcards (20)
Preview
HOSA Dental Science Written Exam
Updated 1155d ago
Flashcards (297)
Preview