Your First Program#
Data Types#
Definition
“A data type is a classification of data which tells the compiler or interpreter how the programmer intends to use the data. Most programming languages support various types of data, including integer, real, character or string, and Boolean” (Kenneth Leroy Busbee and Dave Braunschweig, “Data Types” in Programming Fundamentals)
How a programming language recognizes or understands the type of information shapes how it executes specific commands or operations.
Commonly-used data types (with Python examples) include:
| Name | Python Syntax | Example | Description |
|---|---|---|---|
| String | str() | "Hello World!" | String of characters |
| Integer | int() | 7 | Whole number |
| Float | float() | 1.5 | Decimal number, or number with floating point values |
| Boolean | bool() | True | Two-state system that typically represents true/false values |
| Nothing/Null/NoneType | NoneType | None | No value |
We can use the type() function in Python to check an object or value’s data type.
typeis the function nameThe value or information we are passing to the function goes inside the parenthesis
# a type example
type("Hello world!")
Additional Resources
More on data types, from Busbee and Braunschweig’s Coding Fundamentals:
For more on data types in Python:
Comprehension Check#
![]() |
Data Types Comprehension Check |

Comments#
Comments mark instructions or information in the code that will not run as part of the program. Comments are useful for testing, documenting, and describing what your code is doing.
In Python, single line comments begin with a pound
#symbol and multi-line comments are marked by three sets of double quotation marks""".Additional Resources
For more on comments in Python:
W3Schools, Python Comments