Python Beginner Plan - 7 Day Step-by-Step Guide
Day 1: Setup + Hello World + Basic Syntax
Learn:
- What is Python?
- How to install it
- Write and run your first program
- Variables and data types
Practice:
print("Hello, Python!")
name = "Ali"
age = 25
height = 5.7
is_cool = True
print(name, age, height, is_cool)
Day 2: Operators and Input
Learn:
- Arithmetic: + - * / % **
- Comparison: == != > < >= <=
- Logical: and, or, not
- User input
Practice:
a = int(input("Enter first number: "))
b = int(input("Enter second number: "))
Python Beginner Plan - 7 Day Step-by-Step Guide
print("Sum is:", a + b)
Day 3: Conditions (if/elif/else)
Learn:
- Decision making with if, elif, else
Practice:
marks = int(input("Enter your marks: "))
if marks >= 90:
print("Grade A")
elif marks >= 75:
print("Grade B")
else:
print("Grade C or below")
Day 4: Loops (for and while)
Learn:
- Repeat with loops
- range(), break, continue
Practice:
for i in range(1, 6):
print("Number:", i)
x=0
Python Beginner Plan - 7 Day Step-by-Step Guide
while x < 5:
print(x)
x += 1
Day 5: Lists and Dictionaries
Learn:
- Lists: ordered collection
- Dictionaries: key-value pairs
Practice:
fruits = ["apple", "banana", "mango"]
fruits.append("grape")
print(fruits[2])
student = {"name": "Sara", "age": 20}
print(student["name"])
Day 6: Functions
Learn:
- Create and use functions
- Parameters and return values
Practice:
def greet(name):
print("Hello", name)
Python Beginner Plan - 7 Day Step-by-Step Guide
def add(x, y):
return x + y
greet("Ali")
print("Sum:", add(3, 4))
Day 7: Mini Project Day!
Choose: Calculator / Quiz / To-do List
Example Calculator:
def calculator():
a = float(input("Enter first number: "))
op = input("Enter operator (+ - * /): ")
b = float(input("Enter second number: "))
if op == "+":
print("Result:", a + b)
elif op == "-":
print("Result:", a - b)
elif op == "*":
print("Result:", a * b)
elif op == "/":
print("Result:", a / b)
else:
Python Beginner Plan - 7 Day Step-by-Step Guide
print("Invalid operator!")
calculator()