Introduction to Python Programming
This note provides an introduction to Python programming, a popular
and beginner-friendly language used in web development and data
science.
1. Variables and Data Types
In Python, variables are names for values, serving as containers for
storing data. Basic data types include strings, numbers, and lists.
Integer (int): Whole numbers, e.g., 5, 100, -20
Float (float): Decimal numbers, e.g., 3.14, 0.5, -2.7
String (str): Text, e.g., "Hello", "Python", "123"
Boolean (bool): True or False values, e.g., True, False
2. Basic Operations
You can perform various operations with variables and data types in Python. Here are
some common operations:
Addition (+)
Subtraction (-)
Multiplication (*)
Division (/)
This note provides an introduction to Python programming, a popular
and beginner-friendly language used in web development and data
science.
1. Variables and Data Types
In Python, variables are names for values, serving as containers for
storing data. Basic data types include strings, numbers, and lists.
Integer (int): Whole numbers, e.g., 5, 100, -20
Float (float): Decimal numbers, e.g., 3.14, 0.5, -2.7
String (str): Text, e.g., "Hello", "Python", "123"
Boolean (bool): True or False values, e.g., True, False
2. Basic Operations
You can perform various operations with variables and data types in Python. Here are
some common operations:
Addition (+)
Subtraction (-)
Multiplication (*)
Division (/)