Here's your Telegram post and quiz question:
---
✨🐍 **Day 1: Introduction to Python with Hello World!** 🚀
Welcome to the start of our Python learning adventure! Today, we're taking our very first step into the world of programming with the classic "Hello, World!" program. This simple exercise is crucial for understanding how to write and run basic Python code. Let's get your development environment set up and print your first line of code!
```python
# Our very first Python program!
print("Hello, World!")
```
Output example:
```
Hello, World!
```
**Small challenge:**
Can you modify the `print()` statement to display "Hello, Python Learners!" instead of "Hello, World!"? Try it out and see your changes! 👇
---
---
✨🐍 **Day 1: Introduction to Python with Hello World!** 🚀
Welcome to the start of our Python learning adventure! Today, we're taking our very first step into the world of programming with the classic "Hello, World!" program. This simple exercise is crucial for understanding how to write and run basic Python code. Let's get your development environment set up and print your first line of code!
```python
# Our very first Python program!
print("Hello, World!")
```
Output example:
```
Hello, World!
```
**Small challenge:**
Can you modify the `print()` statement to display "Hello, Python Learners!" instead of "Hello, World!"? Try it out and see your changes! 👇
---
What is the primary function used to display output (like text) on the console in Python?
Anonymous Quiz
0%
display()
0%
show()
100%
print()
0%
output()
Here's your Telegram post for Day 2 of the Python learning series!
---
Hey Python learners! 👋 Ready for Day 2 of our journey? Today, we're diving into the absolute fundamentals: **Variables and Data Types!** 🧠 Think of variables as labeled containers for storing information in your code. Data types tell Python what kind of information is inside – is it text, a whole number, a decimal, or something else? Understanding these is crucial for building any program. Let's get hands-on! 🚀
```python
# Day 2: Variables and Data Types
# 1. Variables: Containers for data
# Assigning different types of data to variables
user_name = "Alice" # String (text)
user_age = 30 # Integer (whole number)
height_in_meters = 1.75 # Float (decimal number)
is_student = True # Boolean (True/False)
print("--- Variable Values ---")
print("Name:", user_name)
print("Age:", user_age)
print("Height:", height_in_meters)
print("Is Student:", is_student)
print("n--- Data Types ---")
# Using the type() function to check a variable's data type
print("Type of user_name:", type(user_name))
print("Type of user_age:", type(user_age))
print("Type of height_in_meters:", type(height_in_meters))
print("Type of is_student:", type(is_student))
# 2. Reassigning a variable
# You can change the value (and even the type) of a variable
user_age = 31 # Alice had a birthday!
print("nNew Age:", user_age)
```
Output example:
```
--- Variable Values ---
Name: Alice
Age: 30
Height: 1.75
Is Student: True
--- Data Types ---
Type of user_name: <class 'str'>
Type of user_age: <class 'int'>
Type of height_in_meters: <class 'float'>
Type of is_student: <class 'bool'>
New Age: 31
```
💡 **Your Turn!** Create three variables: `product_name` (string), `price` (float), and `in_stock` (boolean). Assign them some sensible values (e.g., "Keyboard", 75.99, True). Then, print both their values and their data types. Share your code or output in the comments! 👇
---
---
Hey Python learners! 👋 Ready for Day 2 of our journey? Today, we're diving into the absolute fundamentals: **Variables and Data Types!** 🧠 Think of variables as labeled containers for storing information in your code. Data types tell Python what kind of information is inside – is it text, a whole number, a decimal, or something else? Understanding these is crucial for building any program. Let's get hands-on! 🚀
```python
# Day 2: Variables and Data Types
# 1. Variables: Containers for data
# Assigning different types of data to variables
user_name = "Alice" # String (text)
user_age = 30 # Integer (whole number)
height_in_meters = 1.75 # Float (decimal number)
is_student = True # Boolean (True/False)
print("--- Variable Values ---")
print("Name:", user_name)
print("Age:", user_age)
print("Height:", height_in_meters)
print("Is Student:", is_student)
print("n--- Data Types ---")
# Using the type() function to check a variable's data type
print("Type of user_name:", type(user_name))
print("Type of user_age:", type(user_age))
print("Type of height_in_meters:", type(height_in_meters))
print("Type of is_student:", type(is_student))
# 2. Reassigning a variable
# You can change the value (and even the type) of a variable
user_age = 31 # Alice had a birthday!
print("nNew Age:", user_age)
```
Output example:
```
--- Variable Values ---
Name: Alice
Age: 30
Height: 1.75
Is Student: True
--- Data Types ---
Type of user_name: <class 'str'>
Type of user_age: <class 'int'>
Type of height_in_meters: <class 'float'>
Type of is_student: <class 'bool'>
New Age: 31
```
💡 **Your Turn!** Create three variables: `product_name` (string), `price` (float), and `in_stock` (boolean). Assign them some sensible values (e.g., "Keyboard", 75.99, True). Then, print both their values and their data types. Share your code or output in the comments! 👇
---