Python Data Types | Quizlet

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/6

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

7 Terms

1
New cards

int (Python type); int = 0

Whole numbers (...,-2,-1,0,1,2,...) with arbitrary precision in Python; used for counting and exact arithmetic.

2
New cards

float (Python type); float = 7.99

Numbers with decimals (e.g., 3.14) stored in binary floating-point; great for measurements but subject to rounding error.

3
New cards

bool (Python type); bool = True

Logical truth values True and False; often produced by comparisons and used to control program flow.

4
New cards

str (Python type); str = “any kind of information“

Text data, i.e., a sequence of Unicode characters; supports indexing, slicing, and many helpful string methods.

5
New cards

literal

A value written directly in code (e.g., 42, 3.14, "hello", True); it evaluates to itself.

6
New cards

data type

The "kind" of a value (int, float, bool, str, list, etc.) that determines what operations are valid and how the value is stored in memory.

7
New cards

variable

A space in memory that is used to store data, referenced by a unique identifier