ip project file
ip project file
CERTIFICATE
This is to certify that the Project entitled “Library
Information System. .” prepared by Megha
Chaudhary and Raunak Rawat.
Roll No: _____________ and
____________ respectively are the students of
International Public School, Ganga
Nagar, Meerut (School code: 60174) during the
session 2024-25 in partial fulfillment of AISSCE
2024-25 I.P. (065 New Course) project’s work has
been carried out under the supervision and guidance
of I.P. Teacher Mr. Shamshad Ali.
This report is prepared only for the Informatics
Practices examination and does not form part of any
other course undergone by the candidate.
Teacher’s Signature:
Mrs. Rana Lubana
(Principal)
ACKNOWLEDGEMENT
Student’s Signature:
1.
2.
The Hardware used:
While developing the system, the used hardware
are:
PC with Pentium Dual Core processor having 2
GB RAM, SVGA and other required devices.
Python Features
Python is a dynamic, high level, free open source and
interpreted programming language. It supports object-
oriented programming as well as procedural oriented
programming.
In Python, we don’t need to declare the type of variable
because it is a dynamically typed language.
For example, x = 10
Here, x can be anything such as String, int, etc.
There are many features in Python, some of which are
discussed below –
1. Easy to code:
Python is a high-level programming language. Python is
very easy to learn the language as compared to other
languages like C, C#, JavaScript, Java, etc. It is very easy
to code in python language and anybody can learn python
basics in a few hours or days. It is also a developer-
friendly language.
3. Object-Oriented Language:
One of the key features of python is Object-Oriented
programming. Python supports object-oriented language
and concepts of classes, objects encapsulation, etc.
6. Extensible feature:
Python is an Extensible language. We can write us some
Python code into C or C++ language and, we can compile
that code in C/C++ language.
9. Interpreted Language:
Python is an Interpreted Language because Python code is
executed line by line at a time. like other languages C,
C++, Java, etc. there is no need to compile python code
this makes it easier to debug our code. The source code of
python is converted into an immediate form called
bytecode.
Series
DataFrame
Panel
These data structures are built on top of Numpy
array, which means they are fast.
Features of DataFrame
Potentially columns are of different types
Size – Mutable
Labeled axes (rows and columns)
Can Perform Arithmetic operations on rows and
columns.
How it Works:
1. Add New Cab: The user can input details for a new
cab, which gets added to cabs.csv. The cab_id
is auto incremented.
2. Make Booking: The system checks for available
cabs, calculates the fare based on distance, and books
the cab by marking it as unavailable. The booking
details are stored in bookings.csv.
3. Data Visualization: The system generates visual
reports (bar charts and scatter plots) to show cab
usage and fare statistics.
File Structure:
1. cabs.csv: Contains cab details such as ID, driver's
name, car model, and availability.
2. bookings.csv: Contains booking details like booking
Project Code
(With screenshots)
Cabs.csv
Bookings.csv
.Py File
Cab Management System Program Code
import sys
import pandas as pd
import matplotlib.pyplot as plt
import time
def load_bookings():
try:
return pd.read_csv("bookings.csv")
except FileNotFoundError:
print("Booking data file not found!")
return pd.DataFrame(columns=["booking_id", "customer_id", "cab_id",
"pickup_location",
"dropoff_location", "distance", "fare",
"booking_time"])
# Backup of Data
def backup_data():
cabs = load_cabs()
bookings = load_bookings()
cabs.to_csv("cabs_backup.csv", index=False)
bookings.to_csv("bookings_backup.csv", index=False)
print("Backup completed successfully.\n")
if available_cab is None:
print("No available cabs. Please try again later.")
return
cab_id = available_cab['cab_id']
booking_id = len(bookings) + 1
new_booking = pd.DataFrame([[booking_id, customer_id, cab_id,
pickup_location, dropoff_location,
distance, fare, booking_time]],
columns=["booking_id", "customer_id", "cab_id",
"pickup_location",
"dropoff_location", "distance", "fare",
"booking_time"])
bookings = pd.concat([bookings, new_booking], ignore_index=True)
bookings.to_csv("bookings.csv", index=False)
cabs.to_csv("cabs.csv", index=False)
if __name__ == "__main__":
main_menu()
Bibliography
We find the following resources helpful in completing our
project work -----
1. Textbook: Informatics Practices (Class XI & XII)
2. CBSE Study Material
3. https://www.w3schools.com/
4. https://www.Python.org
5. https://www.mysql.com/
6. https://www.anaconda.com/
7. Google Search engine