π Day 1: Kickstart Your Python Journey!
Objective: Set up Python, write your first program, and grasp core basics.
---
π What is Python?
- A versatile, beginner-friendly language used for:
_Web dev β’ Data science β’ AI/ML β’ Automation β’ and more!_
- Known for clean syntax and readability.
---
π Setup Guide
1. Install Python:
- Download from [python.org](https://www.python.org/downloads/)
- βοΈ Check "Add Python to PATH" during installation.
2. Choose an Editor:
- VS Code (recommended) or PyCharm.
3. Verify Installation:
---
β¨ Your First Python Program
1. Create
2. Run it in the terminal:
Output:
---
π Key Concepts
- Comments: Use
- Printing: Display output with
---
π Try the Python Shell
Type
---
π» Practice Tasks
1. Print your name:
2. Math operations:
---
### π― Day 1 Goals
- [x] Understand Pythonβs purpose.
- [x] Set up your coding environment.
- [x] Write/Run your first script.
- [x] Master
Letβs crush Day 1! πͺ
π *Share your code screenshots in the comments!*
#PythonBasics #LearnToCode #CodingJourney #Python101
Objective: Set up Python, write your first program, and grasp core basics.
---
π What is Python?
- A versatile, beginner-friendly language used for:
_Web dev β’ Data science β’ AI/ML β’ Automation β’ and more!_
- Known for clean syntax and readability.
---
π Setup Guide
1. Install Python:
- Download from [python.org](https://www.python.org/downloads/)
- βοΈ Check "Add Python to PATH" during installation.
2. Choose an Editor:
- VS Code (recommended) or PyCharm.
3. Verify Installation:
bash
python --version
# Should display e.g., "Python 3.11.4"
---
β¨ Your First Python Program
1. Create
day1.py
and add: python
print("Hello, World!")
2. Run it in the terminal:
bash
python day1.py
Output:
Hello, World!
---
π Key Concepts
- Comments: Use
#
to explain code (ignored by Python). python
# This prints a message
print("Comments are useful!")
- Printing: Display output with
print()
. python
print("Python is fun! π")
---
π Try the Python Shell
Type
python
in your terminal to start experimenting: python
>>> print("I'm coding live!")
>>> 5 * 3
>>> 100 / 4
---
π» Practice Tasks
1. Print your name:
python
print("My name is [Your Name]")
2. Math operations:
python
print(8 + 4)
print(15 * 2)
---
### π― Day 1 Goals
- [x] Understand Pythonβs purpose.
- [x] Set up your coding environment.
- [x] Write/Run your first script.
- [x] Master
print()
and comments. Letβs crush Day 1! πͺ
π *Share your code screenshots in the comments!*
#PythonBasics #LearnToCode #CodingJourney #Python101
Python.org
Download Python
The official home of the Python Programming Language
π Day 4: Conditional Statements in Python π
π― Objective:
Learn how to use
---
π What Are Conditional Statements?
They allow your program to make decisions based on certain conditions.
---
β `if` Statement
Checks a condition. If
π§ `else` Statement
Runs when the
π `elif` Statement
Use it to check multiple conditions.
β οΈ Important: Python uses indentation (4 spaces) to define blocks of code. Be consistent!
---
π§ͺ Practice Exercises:
1οΈβ£ Check Even or Odd
2οΈβ£ Grade Calculator
3οΈβ£ Positive, Negative or Zero
---
π Goal for Today:
βοΈ Understand how
βοΈ Write decision-based programs
βοΈ Master proper indentation
#ConditionalStatements #IfElse #PythonBasics #PythonTutorial #CodingLessons #TechEducation #Day4
π― Objective:
Learn how to use
if
, elif
, and else
statements to make decisions in your code.---
π What Are Conditional Statements?
They allow your program to make decisions based on certain conditions.
age = 18
if age >= 18:
print("You are an adult.")
else:
print("You are a minor.")
---
β `if` Statement
Checks a condition. If
True
, it runs the code inside.num = 10
if num > 5:
print("The number is greater than 5.")
π§ `else` Statement
Runs when the
if
condition is False
.num = 3
if num > 5:
print("The number is greater than 5.")
else:
print("The number is not greater than 5.")
π `elif` Statement
Use it to check multiple conditions.
num = 0
if num > 0:
print("The number is positive.")
elif num == 0:
print("The number is zero.")
else:
print("The number is negative.")
β οΈ Important: Python uses indentation (4 spaces) to define blocks of code. Be consistent!
---
π§ͺ Practice Exercises:
1οΈβ£ Check Even or Odd
num = int(input("Enter a number: "))
if num % 2 == 0:
print("The number is even.")
else:
print("The number is odd.")
2οΈβ£ Grade Calculator
score = int(input("Enter your score: "))
if score >= 90:
print("Grade: A")
elif score >= 80:
print("Grade: B")
elif score >= 70:
print("Grade: C")
elif score >= 60:
print("Grade: D")
else:
print("Grade: F")
3οΈβ£ Positive, Negative or Zero
num = int(input("Enter a number: "))
if num > 0:
print("The number is positive.")
elif num == 0:
print("The number is zero.")
else:
print("The number is negative.")
---
π Goal for Today:
βοΈ Understand how
if
, elif
, and else
work βοΈ Write decision-based programs
βοΈ Master proper indentation
#ConditionalStatements #IfElse #PythonBasics #PythonTutorial #CodingLessons #TechEducation #Day4