I’m a 19-year-old CS student transitioning from C++ logic to Python. I'm documenting my 30-day sprint to bridge the gap between academics and industry-level coding.
🏋️ Day 1: Health Tracker Forecast
A predictive tool designed to forecast physical transformation over a 4-week period based on user activity levels.
The Logic: Uses conditional branching (if-elif-else) to categorize user intensity into three tiers: Extreme Burn, Steady Progress, and Minimal Change.
Input Validation: Implemented robust error handling using while True loops to ensure user inputs (workout days and step counts) stay within realistic, logical bounds.
Iterative Forecasting: Utilizes a while loop to simulate a week-by-week weight loss progression, providing a clear vision of long-term results.
Technical Win: Mastering basic control flow and f-string formatting to display data in a clean, professional table format.
` # Day 1: Health Tracker - 4-Week Transformation Forecast
A simple tool to predict waist circumference reduction based on activity levels.
print("--- Welcome to the Health Tracker Forecast ---")
initial_waist = float(input("Enter starting waist (inches): "))
1. Input Validation
while True:
workout = int(input("Enter workout days per week (0-7): "))
if 0 <= workout <= 7:
break
print(f"Invalid input! Please enter a number between 0 and 7.")
while True:
steps = int(input("Enter average daily steps (0-20000): "))
if 0 <= steps <= 20000:
break
print(f"Invalid input! Please enter a number between 0 and 20000.")
print("\n--- 4-Week Transformation Forecast ---")
waist = initial_waist
week = 1
while week <= 4:
# Forecast Logic based on activity intensity
if steps >= 10000 and workout >= 4:
waist -= 0.25
status = "Extreme Burn (High Intensity)"
elif steps >= 7000 or workout >= 3:
waist -= 0.15
status = "Steady Progress (Moderate)"
else:
waist -= 0.05
status = "Minimal Change (Low Activity)"
print(f"Week {week}: {status:<30} | Current Waist: {waist:.2f}\"")
week += 1
print("-" * 40)
print(f"[RESULT] Final Size: {waist:.2f}\" | Total Loss: {initial_waist - waist:.2f}\"")`
day 2 here:
`print("=== Number Analyzer Tool ===")
num=int(input("Enter a number till you want analyzation: ")) #number is inputed from here
printing all number till that via for loop
print(f"---Priting number from 1 to {num}---")
for i in range(1,num+1):
print(i)
Total sum:
total=0
print(f"---Total sum from 1 to {num}---")
for i in range(1,num+1):
total+=i
print(f"Sum is: {total}")
couting even numbers:
even_counter=0
print(f"---Counting Even number from 1 to {num}---")
for i in range(1,num+1):
if(i%2==0):
even_counter+=1
print(f"Total even numbers are: {even_counter}")
counting odd numbers:
print(f"---Counting odd number from 1 to {num}---")
odd_counter=0
for i in range(1,num+1):
if(i%2!=0):
odd_counter+=1
print(f"Total odd numbers are: {odd_counter}")
Factorial of that input number:
factorail=1
print(f"---Factorial of {num}---")
for i in range (1,num+1):
factorail=factorail*i
print(f"{num}!= {factorail}")
multiples of 5 till inputted number
multiples_of_5=0
print(f"---Multiples of 5---")
for i in range(1,num+1):
if(i%5==0):
multiples_of_5+=1
print(f"Multiples of 5 count: {multiples_of_5}")
pattern output:
for i in range(1,5):
print(""(i+1))
prime numbers:
print("---Prime counter---")
prime_counter=0
for i in range(2,num+1):
for u in range(2,i):
if i%u==0:
break
else:
prime_counter+=1
print(f"The total prime number are: {prime_counter}")`
day 3 :
`print("==== Student Marks Analyzer ====")
marks = []
grades = []
pass_count = 0
fail_count = 0
total_students = int(input("Enter total number of students: "))
Input marks
for i in range(total_students):
num = int(input("Enter marks of each student out of 100: "))
marks.append(num)
Highest & Lowest
print(f"The highest mark is {max(marks)}")
print(f"The lowest mark is {min(marks)}")
Grade calculation
for m in marks:
if m >= 90:
pass_count += 1
grades.append('A')
elif m >= 80:
pass_count += 1
grades.append('B')
elif m >= 70:
pass_count += 1
grades.append('C')
elif m >= 60:
pass_count += 1
grades.append('D')
else:
fail_count += 1
grades.append('F')
Output
print(f"\nPassing students: {pass_count}")
print(f"Failing students: {fail_count}")
print("\n===== Grade Distribution =====")
print("Marks || Grade")
for i in range(total_students):
print(f"{marks[i]} || {grades[i]}")`
day 4 :
`print("==== Personal Finance Tracker ====")
income = 0
expenses = 0
balance = 0
expenses_categories = []
def add_income():
global income, balance
amount = int(input("Enter income: "))
income += amount
balance += amount
def add_expense():
global expenses, balance
amount = int(input("Enter expense amount: "))
category = input("Enter expense type (food, travel, etc): ")
expenses += amount
balance -= amount
expenses_categories.append((category, amount))
def show_summary():
print("Income | Expenses | Balance")
print(f"{income} {expenses} {balance}")
def show_expesse_list():
print("Expense List:")
print("Type : amount ")
for category, amount in expenses_categories:
print(f"{category}: {amount}")
def menu():
while True:
print("\nTools:")
print("1. Add Income")
print("2. Add Expense")
print("3. Show Summary")
print("4. Show Expenses")
print("5. Exit")
tool = int(input("Choose option: "))
if tool == 1:
add_income()
elif tool == 2:
add_expense()
elif tool == 3:
show_summary()
elif tool == 4:
show_expesse_list()
elif tool == 5:
break
else:
print("Invalid input!Try to input between 1-5")
menu()`
for github here :
Github
Top comments (0)