Floating Point Numbers and Strings (Vocabulary)

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/14

flashcard set

Earn XP

Description and Tags

Vocabulary flashcards covering floating point numbers and strings, including notation, limits, and string handling in Python.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

15 Terms

1
New cards

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.

2
New cards

Scientific notation

A way to write numbers as mantissa × 10^exponent; in Python, written as mantissa e exponent with no spaces.

3
New cards

Mantissa

The significant digits part of a floating point number in scientific notation.

4
New cards

Exponent

The power of 10 in scientific notation; determines the magnitude of the number.

5
New cards

Python scientific notation syntax

Use the letter e to denote the exponent (e.g., 1.234567e3); no spaces around the e.

6
New cards

Round-off error

The small discrepancy that arises because floating point values are represented with finite precision.

7
New cards

Infinity (floating point)

A value indicating overflow; represents numbers too large to represent, often shown as inf.

8
New cards

Overflow

Condition where a number exceeds the largest representable magnitude, causing overflow to Infinity.

9
New cards

Underflow

Condition where a number is too small to be represented (near zero) and may be rounded to zero.

10
New cards

Binary representation

Numbers are stored in binary form in the computer; floating point numbers use binary encoding.

11
New cards

String

Text data; a sequence of characters.

12
New cards

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.

13
New cards

Escape character

Backslash used to escape quotes and to introduce special characters like \n (newline), \t (tab), and \ (backslash).

14
New cards

Triple-quoted strings

Strings delimited by three consecutive quotes (three singles or three doubles); they can span multiple lines and include quotes without escaping.

15
New cards

Newline escape sequence

Escape sequence \n inserts a line break within a string.