1/12
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Data Type (Python)
Defines the type of value a variable refers to; all data types in Python are objects.
Primitive Data Types
Simple, foundational types in Python including numeric, text, and boolean.
int
A numeric data type used to represent whole numbers.
float
A numeric data type used to represent numbers with decimal points.
complex
A numeric data type used to represent complex numbers; not used in this course.
str
A data type used to represent text data, enclosed in quotes.
bool
A data type used to represent truth values: True or False.
type() Function
A built-in function used to return the data type of an object.
Type Conversion
The process of converting one data type to another, either implicitly or explicitly.
Implicit Type Conversion
Also called coercion; Python automatically converts data types during operations.
Explicit Type Conversion
Manually converting data types using built-in functions like int() or float().
Constant (Python)
A variable intended to remain unchanged, named in uppercase by convention.
Naming Convention for Constants
Constants are named using all uppercase letters (e.g., PI = 3.14159).