Python 7 Day Beginner Plan
Python 7 Day Beginner Plan
Learn:
- What is Python?
- How to install it
Practice:
print("Hello, Python!")
name = "Ali"
age = 25
height = 5.7
is_cool = True
Learn:
- Arithmetic: + - * / % **
- User input
Practice:
Learn:
Practice:
print("Grade A")
print("Grade B")
else:
print("Grade C or below")
Learn:
Practice:
print("Number:", i)
x=0
Python Beginner Plan - 7 Day Step-by-Step Guide
while x < 5:
print(x)
x += 1
Learn:
Practice:
fruits.append("grape")
print(fruits[2])
print(student["name"])
Day 6: Functions
Learn:
Practice:
def greet(name):
print("Hello", name)
Python Beginner Plan - 7 Day Step-by-Step Guide
return x + y
greet("Ali")
Example Calculator:
def calculator():
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()