Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
# 🌍 CO2 Emission Calculator

**CO2 Emission Calculator** is a simple Python tool to estimate CO2 emissions  
for a given travel distance and mode (car, bus, flight).  
You can log trips and see total CO2 emitted over time.

---

## Features

- 🚗 Estimate CO2 emissions for **car, bus, or flight**  
- 💾 Log trips and save them in `co2_emissions.json`  
- 📊 View a list of all logged trips and **total CO2 emissions**  
- 🖥️ Works in terminal or Python IDE  
- 🧠 Beginner-friendly and interactive

---

## Getting Started

1. **Install Python 3**  
2. Save `co2_emission_calculator.py` in a folder  
3. Run the script:
```bash
python co2_emission_calculator.py

🌍 CO2 Emission Calculator 🌍

Menu:
1️⃣  Log a Trip
2️⃣  Show Logged Trips & Total CO2
3️⃣  Exit
Choose an option (1-3): 1
Enter travel mode (car/bus/flight): car
Enter distance traveled (km): 120
✅ Trip logged! Estimated CO2: 23.04 kg