python final exam

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/106

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 2:41 PM on 4/27/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

107 Terms

1
New cards

%c specifier

A format specifier used in older C-style string formatting to represent a single character from its integer Unicode code.

2
New cards

approximate values

Numerical values stored as floating-point numbers that may contain small inaccuracies due to binary conversion limits.

3
New cards

float(data)

A built-in constructor that converts a string or integer into a floating-point number.

4
New cards

int(data)

A built-in constructor that converts a value into a whole-number integer, truncating any decimal portion.

5
New cards

associative array

An abstract data structure composed of key-value pairs; the computer science term for a Python dictionary.

6
New cards

aware datetime object

A datetime object that includes specific timezone and daylight savings time information.

7
New cards

attributes

Variables that belong to an object, such as the.year or.month components of a date object.

8
New cards

binary file

A file format that stores data in a machine-readable byte format rather than human-readable text.

9
New cards

binary notation

The base-2 numbering system (0s and 1s) used by computers to store all data and perform calculations.

10
New cards

ceil()

A function in the math module that rounds a number up to the nearest whole integer.

11
New cards

class

A blueprint for creating objects, defining the attributes and methods that instances of that class will possess.

12
New cards

clear()

A dictionary method that removes all items, leaving the structure empty.

13
New cards

comma-separated values

A common plain-text format (CSV) for storing tabular data with commas as delimiters between fields.

14
New cards

comparison operators

Symbols such as ==,!=,

15
New cards

constructor

A special method used to initialize a new instance of a class, such as datetime(year, month, day).

16
New cards

CSV

The acronym for Comma-Separated Values, a file format used to store data in a simple text-based table.

17
New cards

csv module

The standard Python library providing tools to read from and write to CSV formatted files.

18
New cards

date and time formatting codes

Special symbols like %Y, %m, and %d used with strftime and strptime to format temporal data.

19
New cards

date class

A class within the datetime module specifically for managing year, month, and day data.

20
New cards

date object

An instance of the date class representing a specific calendar day without a time component.

21
New cards

date.today()

A method that retrieves the current system date and returns it as a date object.

22
New cards

datetime class

A class that integrally stores both calendar date and clock time information.

23
New cards

datetime module

The core Python library for all date, time, and time-interval calculations.

24
New cards

datetime object

A specific instance of the datetime class representing a unique point in time.

25
New cards

datetime.now()

A method that retrieves the current system date and precise time as a datetime object.

26
New cards

Decimal class

A class in the decimal module used for exact numerical calculations, avoiding floating-point errors.

27
New cards

del keyword

A Python keyword used to delete a reference to an object, such as removing an item from a dictionary.

28
New cards

delimiter

A character used to mark the boundary between separate regions in plain text, such as a comma in CSV.

29
New cards

dict()

The constructor used to create a new dictionary object, potentially from a list of tuples.

30
New cards

dictionary

A mutable, unordered collection of key-value pairs that provides fast data retrieval via unique keys.

31
New cards

exact values

Values represented by the Decimal class that do not suffer from binary approximation issues.

32
New cards

except clause

The part of a try statement that defines the code to run if a specific error occurs.

33
New cards

exception

A runtime error that interrupts the normal execution of a program.

34
New cards

exit()

A function from the sys module used to terminate a program immediately, often used in error handling.

35
New cards

FileNotFoundError

An exception raised when the program attempts to open a file that does not exist at the specified path.

36
New cards

finally clause

A block of code within a try statement that executes regardless of whether an exception occurred.

37
New cards

floating-point error

Inaccuracies caused by the inability of computers to represent certain decimal fractions exactly in binary.

38
New cards

floating-point number

A number format (float) that uses 8 bytes to represent decimal values approximately.

39
New cards

floor()

A function in the math module that rounds a decimal value down to the nearest whole integer.

40
New cards

from decimal import Decimal

The standard import statement required to use high-precision decimal arithmetic in Python.

41
New cards

get()

A dictionary method that retrieves a value for a key or a default value if the key does not exist.

42
New cards

immutable

A property of an object that prevents it from being modified after creation; strings and tuples are examples.

43
New cards

in keyword

An operator used to check for the existence of a key in a dictionary or a character in a string.

44
New cards

index

A numerical value representing the position of an item in a sequence, starting at zero.

45
New cards

isalpha()

A string method that returns True if all characters in the string are alphabetic letters.

46
New cards

isdigit()

A string method that returns True if all characters in the string are numeric digits (0-9).

47
New cards

items()

A dictionary method that returns a view object of all key-value pairs in tuple format.

48
New cards

iterators

Objects that allow for the sequential traversal of a data stream, fetching one item at a time.

49
New cards

key

A unique, immutable identifier in a dictionary used to store and retrieve a corresponding value.

50
New cards

key/value pair

The fundamental storage unit in a dictionary consisting of an identifier and its associated data.

51
New cards

keys()

A dictionary method that returns a view object containing all the keys currently in the dictionary.

52
New cards

lc.setlocale

The function used to define the regional formatting rules for numbers and currency.

53
New cards

len()

A built-in function that returns the count of items in a sequence, such as characters in a string.

54
New cards

list

A mutable, ordered sequence of items that can be of different data types.

55
New cards

list()

A constructor that creates a new list object, often used to convert view objects into static collections.

56
New cards

locale module

The library used for formatting data based on cultural and geographic conventions.

57
New cards

map

An abstract term for a dictionary-like structure; also a built-in function to apply logic to a sequence.

58
New cards

math module

A standard library providing advanced mathematical functions and constants like pi and sqrt().

59
New cards

microsecond

The smallest unit of time measured by the datetime module, equal to one-millionth of a second.

60
New cards

millisecond

A unit of time equal to one-thousandth of a second, often used in performance timing.

61
New cards

modify a string

The act of creating a new string based on an existing one, as original strings are immutable.

62
New cards

mutable

A property of an object that allows it to be changed after it is created; lists and dictionaries are examples.

63
New cards

naïve datetime object

A datetime object that lacks timezone information, making it relative to the local system only.

64
New cards

named arguments

A method of passing arguments to a function by specifying the parameter name and value.

65
New cards

new line

A control character (\n) that signifies the end of a line of text.

66
New cards

now()

A datetime method that returns the current local date and time.

67
New cards

object

An instance of a class that contains both data (attributes) and behavior (methods).

68
New cards

octal code

A way to represent a character using its base-8 value, often used in escape sequences like \ooo.

69
New cards

OSError

A generic exception class for errors related to the operating system, such as file access issues.

70
New cards

parsing

The process of analyzing a string to extract structured data, such as converting a date-string into an object.

71
New cards

pickle

The process of serializing a Python object into a byte stream for storage in a binary file.

72
New cards

pickle module

The Python library used for serializing and deserializing complex objects and data structures.

73
New cards

pop()

A method used to remove an item from a dictionary or list and return its value.

74
New cards

print format

A set of rules defined within a string to control how data is displayed to the user.

75
New cards

print(data).format

An older syntax for string formatting, now largely replaced by the.format() method or f-strings.

76
New cards

raise statement

A keyword used to manually trigger an exception when specific conditions are met.

77
New cards

read()

A file method that retrieves the entire contents of a file as a single string.

78
New cards

readline()

A file method that reads the next single line from a text file.

79
New cards

reader()

A function in the csv module that generates an iterator for reading rows from a CSV file.

80
New cards

readlines()

A file method that reads all lines from a file and returns them as a list of strings.

81
New cards

repetition operator

The asterisk (*) used with strings or lists to create multiple copies of the data.

82
New cards

replace()

A string method that returns a new string where specific substrings have been swapped for others.

83
New cards

scientific notation

A way to express very large or small numbers using powers of ten (e.g., 1.5e+2).

84
New cards

sequence

A generic term for an ordered collection of items, such as strings, lists, or tuples.

85
New cards

setlocale()

The primary function in the locale module for defining formatting standards.

86
New cards

slice a string

The process of extracting a portion of a string using the [start:stop] index syntax.

87
New cards

span of time

A duration between two points in time, represented by a timedelta object.

88
New cards

strftime()

A method that converts a datetime object into a formatted string for display.

89
New cards

strings as lists

The concept that strings share properties with lists, such as support for indexing and slicing.

90
New cards

strip()

A string method that removes leading and trailing whitespace from a text value.

91
New cards

strptime()

A datetime method used to create a datetime object from a formatted string.

92
New cards

symbol table

A dictionary-like internal structure that Python uses to map variable names to memory objects.

93
New cards

sys module

A module that provides access to system-specific parameters and functions, such as exit().

94
New cards

text file

A file format that stores data as a sequence of human-readable characters.

95
New cards

time object

An instance of the time class representing a specific clock time regardless of the date.

96
New cards

timedelta()

A class used to calculate the difference between two temporal objects or to shift a date by a duration.

97
New cards

title()

A string method that capitalizes the first letter of every word in the sequence.

98
New cards

try clause

The section of code where exceptions are monitored for potential errors.

99
New cards

try statement

A control structure used to handle runtime errors through try, except, else, and finally blocks.

100
New cards

tuple

An immutable sequence of items, often used for data that should not change during execution.