1/14
Vocabulary flashcards covering floating point numbers and strings, including notation, limits, and string handling in Python.
Name | Mastery | Learn | Test | Matching | Spaced |
|---|
No study sessions yet.
Floating point number
A real number with a decimal point, stored in binary with limited precision (mantissa and exponent), which can lead to rounding errors.
Scientific notation
A way to write numbers as mantissa × 10^exponent; in Python, written as mantissa e exponent with no spaces.
Mantissa
The significant digits part of a floating point number in scientific notation.
Exponent
The power of 10 in scientific notation; determines the magnitude of the number.
Python scientific notation syntax
Use the letter e to denote the exponent (e.g., 1.234567e3); no spaces around the e.
Round-off error
The small discrepancy that arises because floating point values are represented with finite precision.
Infinity (floating point)
A value indicating overflow; represents numbers too large to represent, often shown as inf.
Overflow
Condition where a number exceeds the largest representable magnitude, causing overflow to Infinity.
Underflow
Condition where a number is too small to be represented (near zero) and may be rounded to zero.
Binary representation
Numbers are stored in binary form in the computer; floating point numbers use binary encoding.
String
Text data; a sequence of characters.
String delimiter (single vs double quotes)
Strings can be delimited by either single quotes or double quotes; choosing the delimiter avoids conflicts when the text contains the other quote.
Escape character
Backslash used to escape quotes and to introduce special characters like \n (newline), \t (tab), and \ (backslash).
Triple-quoted strings
Strings delimited by three consecutive quotes (three singles or three doubles); they can span multiple lines and include quotes without escaping.
Newline escape sequence
Escape sequence \n inserts a line break within a string.