Lesson 3: Variables and Data Types 🐱
In Python, variables are used to store data. Let’s see how it works:
Example:
# This is a variable
name = "John"
age = 25
height = 5.9
print("Name:", name)
print("Age:", age)
print("Height:", height)
Data Types:
String: Text, e.g., "Hello"
Integer: Whole numbers, e.g., 25
Float: Decimal numbers, e.g., 5.9
Boolean: True/False, e.g., True
Task:
Create variables for your name, age, and favorite color, and print them. Share your code and output in the comment!
Next, we’ll learn about input() for user interaction.
❤️ If you’re vibing with posts like this, drop a heart — I’ll keep them coming Stay tuned! 😉
🙂 Must join our Channel @TIGRAYTECHC
In Python, variables are used to store data. Let’s see how it works:
Example:
# This is a variable
name = "John"
age = 25
height = 5.9
print("Name:", name)
print("Age:", age)
print("Height:", height)
Data Types:
String: Text, e.g., "Hello"
Integer: Whole numbers, e.g., 25
Float: Decimal numbers, e.g., 5.9
Boolean: True/False, e.g., True
Task:
Create variables for your name, age, and favorite color, and print them. Share your code and output in the comment!
Next, we’ll learn about input() for user interaction.
❤️ If you’re vibing with posts like this, drop a heart — I’ll keep them coming Stay tuned! 😉
🙂 Must join our Channel @TIGRAYTECHC