D335 Python Study-Questions and Answers Verified
100% Correct
overflow
error that results when the number of bits is not enough to hold the number
symbol for outputting certain number of digits after decimal point
:2f}' (for 2 digits after decimal point)
expression
combination of items, like variables, literals, operators, and parentheses, that evaluates to
a value, like 2 * (x + 1)
literal
specific value in code like 2
operator
symbol that performs a build-in calculation like + which does addition
**
exponent operator
floor division operator
Rounds the quotient down to a whole number after division
module
Python code located in another file. The programmer can import the module for use in their
own file, or in an interactive interpreter. The programmer first imports the module to the top
of a file.
,like the math module for advanced math operations
dot notation
Used to reference an object in an imported module.
import
executes the contents of a file containing python code and makes the definitions from that
file available
function call
process of invoking a function
code point
Python uses Unicode to represent every possible character as a unique number, known as
a code point.
For example, the character 'G' has the code point decimal value of 71.
raw string
a way to ignore escape sequences
created by adding an 'r' before a string literal, as in r'this is a raw string\'', which would
output as this is a raw string\'.
ord()
returns an encoded integer value for a string of length one.
chr()
converts an integer into a character. Thus, chr(ord('a') + 1) results in 'b'.
sequence type
specifies a collection of objects ordered from left to right
, len()
Returns the number of characters in a text
string ex: print(Len(George_v),
brackets
used to access a character at a specific index position
ex: alphabet[0]
is a
string concatenation
add new characters to the end of a string
ex: "New" + "York"
container
a construct used to group related values together and contains references to other objects
instead of data
list
container created by surrounding a sequence of variables or literals with
brackets Ex: my_list = [10, 'abc']
element
a list item
method
instructs an object to perform some action, and is executed by specifying the method
name following a "." symbol and an object.
append()
100% Correct
overflow
error that results when the number of bits is not enough to hold the number
symbol for outputting certain number of digits after decimal point
:2f}' (for 2 digits after decimal point)
expression
combination of items, like variables, literals, operators, and parentheses, that evaluates to
a value, like 2 * (x + 1)
literal
specific value in code like 2
operator
symbol that performs a build-in calculation like + which does addition
**
exponent operator
floor division operator
Rounds the quotient down to a whole number after division
module
Python code located in another file. The programmer can import the module for use in their
own file, or in an interactive interpreter. The programmer first imports the module to the top
of a file.
,like the math module for advanced math operations
dot notation
Used to reference an object in an imported module.
import
executes the contents of a file containing python code and makes the definitions from that
file available
function call
process of invoking a function
code point
Python uses Unicode to represent every possible character as a unique number, known as
a code point.
For example, the character 'G' has the code point decimal value of 71.
raw string
a way to ignore escape sequences
created by adding an 'r' before a string literal, as in r'this is a raw string\'', which would
output as this is a raw string\'.
ord()
returns an encoded integer value for a string of length one.
chr()
converts an integer into a character. Thus, chr(ord('a') + 1) results in 'b'.
sequence type
specifies a collection of objects ordered from left to right
, len()
Returns the number of characters in a text
string ex: print(Len(George_v),
brackets
used to access a character at a specific index position
ex: alphabet[0]
is a
string concatenation
add new characters to the end of a string
ex: "New" + "York"
container
a construct used to group related values together and contains references to other objects
instead of data
list
container created by surrounding a sequence of variables or literals with
brackets Ex: my_list = [10, 'abc']
element
a list item
method
instructs an object to perform some action, and is executed by specifying the method
name following a "." symbol and an object.
append()