================================================================================
  Question 36: Weekly Weather Analysis & Temperature Line Graph
================================================================================

FULL QUESTION:
Task:
1. Create a DataFrame to store weather details for 7 days:
   Day, Temperature (°C), Humidity (%), Rainfall (mm).
2. Compute the average temperature and total rainfall.
3. Plot a line graph of Temperature vs. Day.

SHORT QUESTION:
Weekly weather DataFrame storing Day, Temp, Humidity, Rainfall; computes metrics and plots Temperature vs. Day line graph.

================================================================================
README & SETUP INSTRUCTIONS:
================================================================================
# Question 36: Weekly Weather Analysis & Temperature Line Graph

- Prerequisites: Python 3.x, Pandas, Matplotlib (pip install pandas matplotlib).
- Setup: None.
- How to Run: python question_36.py
- Expected Behavior: Computes average temperature, total rainfall, and plots Temperature vs. Day line graph.

================================================================================
SOURCE CODE FILES:
================================================================================

1. question_36.py
--------------------------------------------------------------------------------
import pandas as pd
import matplotlib.pyplot as plt

data = {
    "Day": ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
    "Temperature (°C)": [28.5, 30.2, 31.0, 27.8, 26.5, 29.0, 32.1],
    "Humidity (%)": [65, 70, 72, 85, 90, 78, 60],
    "Rainfall (mm)": [0.0, 2.5, 5.0, 18.2, 22.4, 4.1, 0.0]
}

df = pd.DataFrame(data)

print("7-Day Weather Forecast DataFrame:")
print(df)
print("=" * 55)

avg_temp = df["Temperature (°C)"].mean()
total_rain = df["Rainfall (mm)"].sum()

print(f"Average Temperature : {avg_temp:.2f} °C")
print(f"Total Rainfall      : {total_rain:.2f} mm")
print("=" * 55)

plt.figure(figsize=(8, 4.5))
plt.plot(
    df["Day"],
    df["Temperature (°C)"],
    marker="o",
    color="#e74c3c",
    linewidth=2.5,
    markersize=7,
    label="Temperature (°C)"
)

plt.title("Daily Temperature Trend (7 Days)", fontsize=14, fontweight="bold")
plt.xlabel("Day of the Week", fontsize=12)
plt.ylabel("Temperature (°C)", fontsize=12)
plt.grid(True, linestyle="--", alpha=0.6)
plt.legend()
plt.tight_layout()
plt.show()
--------------------------------------------------------------------------------
