The Automated Ride-Sharing Fare Calculator & Logger is a Python-based console application developed using Object-Oriented Programming (OOP) concepts. It allows a rider to log completed rides, automatically calculates the ride fare based on ride type and time slot, stores ride details in a log file, and generates a daily revenue report.
This project demonstrates the practical implementation of classes, objects, file handling, dictionaries, lists, and menu-driven programming in Python.
- Log completed rides
- Automatic fare calculation
- Dynamic pricing using nested dictionaries
- View all rides logged during the session
- Store ride history in a text file
- Generate a daily revenue report
- Menu-driven console interface
- Uses Object-Oriented Programming (OOP)
| Time Slot | Price per km |
|---|---|
| Morning | ₹15 |
| Afternoon | ₹18 |
| Evening | ₹20 |
| Night | ₹24 |
| Time Slot | Price per km |
|---|---|
| Morning | ₹22 |
| Afternoon | ₹25 |
| Evening | ₹28 |
| Night | ₹35 |
Fare Formula
Fare = Distance × Rate per Kilometer
- Python 3
- Jupyter Notebook
- Object-Oriented Programming (OOP)
- File Handling
- Lists
- Dictionaries
Automated Ride-Sharing Fare Calculator & Logger/
│
├── FareCalculator.ipynb # Main project
├── Ridelog.txt # Stores completed rides
├── daily_ride_report.txt # Daily revenue report
├── .gitignore
└── README.md
1. Log Ride
2. Today's Rides
3. Today's Revenue Report
4. Exit
-
Enter Rider ID and Rider Name.
-
Select Log Ride.
-
Enter:
- Customer Name
- Pickup Location
- Drop Location
- Distance
- Ride Type (Standard/Premium)
- Time Slot (Morning/Afternoon/Evening/Night)
-
The application calculates the fare automatically.
-
Ride details are stored in
Ridelog.txt. -
Select Today's Revenue Report to generate
daily_ride_report.txt.
- Classes and Objects
- Constructors
- Instance Variables
- Methods
- Encapsulation
- Method Overriding (
__str__) - Object Composition
This project helped in understanding:
- Object-Oriented Programming in Python
- Menu-driven application development
- Dynamic fare calculation
- Nested dictionaries
- File reading and writing
- Report generation
- Basic Git and GitHub project management
- Rider login system
- Customer database
- Date and time-based ride history
- Monthly revenue reports
- CSV/Excel export
- Graphical User Interface (Tkinter)
- Database integration (SQLite/MySQL)
Asish Amitansu Rout
MCA Student | Python | Data Analytics
This project is created for educational and learning purposes.