Programming Basics
Programming Basics
1. Data Types
Data types define the nature of data that can be stored and manipulated in a programming
language.
They determine the kind of operations that can be performed on a given piece of data.
Types of Data:
1. Primitive Data Types - Basic types of data that represent single values.
3. Abstract Data Types (ADTs) - Data structures designed for specific functionalities.
- Floating-Point (float): Numbers with decimal points (e.g., 3.14, -0.001, 2.0)
- Dictionary (dict): Key-value pairs, unordered, mutable. Example: {"name": "John", "age": 25}
Casting
Casting is the process of converting one data type into another.
Examples:
Operators
Variables store data values that can change during program execution.
Example:
PI = 3.14159
4. Strings
Conclusion
Understanding these programming basics is crucial for working with data effectively.