0% found this document useful (0 votes)
14 views

Flight Ticket Booking Report-8

The document outlines a project titled 'Flight Ticket Booking' completed by G Bala Aditya Reddy under the guidance of K Srikantha for the Computer Science curriculum. It details the project's objectives, features, implementation using Python and SQL, and includes acknowledgments, testing processes, and student reflections on the learning experience. The project aims to create an interactive Discord bot for booking flight tickets, showcasing practical applications of programming and database management.

Uploaded by

jovanreddy07
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

Flight Ticket Booking Report-8

The document outlines a project titled 'Flight Ticket Booking' completed by G Bala Aditya Reddy under the guidance of K Srikantha for the Computer Science curriculum. It details the project's objectives, features, implementation using Python and SQL, and includes acknowledgments, testing processes, and student reflections on the learning experience. The project aims to create an interactive Discord bot for booking flight tickets, showcasing practical applications of programming and database management.

Uploaded by

jovanreddy07
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

FLIGHT TICKET BOOKING

G Bala Aditya Reddy (Roll No. 21)


P Sri Ram Charan (Roll No. 10)
G V Hemanth Raghava (Roll No. 11)
V Hemanth (Roll No. 33)

CLASS: XII A
SUBJECT: COMPUTER SCIENCE (083)
PROJECT GUIDE: K Srikantha (PGT CS)
1

CERTIFICATE

This is to certify that


G BALA ADITYA REDDY
student of Class XII A
has successfully completed the project work entitled
"FLIGHT TICKET BOOKING"
under the guidance of
Smt. K Srikantha (PGT CS)
during the academic year 2024-25 in partial fulfillment of
COMPUTER SCIENCE (083)
AISSCE Practical Examination
conducted by the Central Board of Secondary Education.

(Signature of External Examiner) (Signature of Principal)


2

ACKNOWLEDGEMENT

The success of this project is a result of the encouragement


and guidance of several individuals. I would like to express
my gratitude to Shri Roopinder Singh, Principal of our
Vidyalaya, and my Computer Science teacher, Smt. K
Srikantha, who critically reviewed the project and helped
in solving each and every problem which occurred during
implementation. Special thanks to all who provided
assistance and motivation.
3

TABLE OF CONTENTS

Topic Page Number


Introduction 4
Features Overview 5
Code modules 6
SQL Query Execution 8
Modal Implementation 9
Hardware & Software 11
Requirements
Source Code 14
Testing & Output 15
Conclusion 18
Advantages & Disadvantages 19
Student Reflections 20
Bibliography 21
4

INTRODUCTION
The "Flight Ticket Booking" project represents a practical
implementation of Python programming, integrating
advanced tools and libraries to solve real-world problems in
an interactive and efficient manner. This project was designed
as a Discord bot that enhances server functionality by
incorporating features such as SQL query execution and
dynamic flight ticket booking. By utilizing powerful Python
libraries like Discord.py, geopy, and MySQL, the bot provides
seamless interactivity and computational capabilities.

❖ OBJECTIVE:
The primary objective of this project is to create a user-friendly
and interactive platform that simplifies flight ticket booking
through Discord. It aims to:

● Streamline the ticket booking process with accurate and


dynamic pricing & provide an engaging user experience
through customized Discord interactions.
● Facilitate SQL query execution for database management
and retrieval.
● Demonstrate the integration of programming concepts and
database management in practical applications.
5

FEATURES OVERVIEW

➔SQL Query Execution:


◆Users can execute SQL queries using the !sql
command.
◆Results are dynamically handled, including
pagination for long outputs.

➔Flight Ticket Booking:


◆Book tickets through interactive modals.
◆Dynamically calculate ticket prices based on
distance between cities using geopy.

➔Custom Interaction and UI:


◆Incorporates Discord embeds and modals for better
user interaction.
◆Uses views with buttons for interactive elements
6

CODE MODULES
❖ IMPORTS:

The bot uses several essential libraries:


7

❖ Setup and Initialization:

➢Discord Intents:
Configures the bot to access and handle
message content.

❖ SDH
➢Command Prefix:
Sets up the command prefix for bot
interactions.
8

SQL QUERY EXECUTION


The bot provides a command to execute SQL queries, fetch
results, and handle the errors or long outputs through
pagination. For instance:
9

MODAL IMPLEMENTATION
The bot uses Discord's UI components for interactive ticket
booking. A snippet from the actual code is given below:
10

Features of the purchase command:


➔Uses geopy to calculate distances between cities.
➔Applies a custom pricing model ($0.5 per km).
➔Provides real-time interaction through modals.

❖ OTHER COMMANDS OF THE BOT LISTED:


11

HARDWARE & SOFTWARE REQUIREMENTS


❖ For Windows:
➢Hardware Requirements:
■ Processor: Dual-core processor (2 GHz or
faster)
■ RAM: 4 GB (8 GB recommended for
multitasking)
■ Storage: 10 GB of free disk space
■ Internet: Stable broadband connection
■ Graphics: Integrated graphics (no special
requirements)
➢Software Requirements:
■ Operating System: Windows 10 or later (64-bit
recommended)
■ Python: Python 3.10+ (installed via the official
Python installer)
■ IDE/Text Editor: Visual Studio Code,
PyCharm, or any text editor.
■ Database Tools: MySQL Workbench
Additionally, pip for Python packages & MySQL Server for db (optional)
12

❖ For macOS:
➢Hardware Requirements:
■ Processor: Apple M1/M2 chip or Intel Core
i5/i7 processor
■ RAM: 4 GB (8 GB recommended)
■ Storage: 10 GB of free disk space
■ Internet: Stable broadband connection
■ Graphics: Integrated Apple GPU or Intel Iris
Graphics

➢Software Requirements:
■ Operating System: macOS Big Sur or later
■ Python: Python 3.10+ (via Homebrew or the
Python.org installer)
■ IDE/Text Editor: Visual Studio Code, PyCharm,
or Xcode
■ Database Tools: MySQL Workbench

Additionally, Homebrew package manager for installing Python and


other dependencies. MySQL Server (optional)
13

❖ For Linux:
➢Hardware Requirements:
■ Processor: Dual-core processor (2 GHz or
faster)
■ RAM: 4 GB (8 GB recommended)
■ Storage: 10 GB of free disk space
■ Internet: Stable broadband connection
■ Graphics: Integrated graphics (no special
requirements)
➢Software Requirements:
■ Operating System: Ubuntu 20.04 LTS or later,
Debian, Fedora, or any modern Linux
distribution.
■ Python: Python 3.10+ (usually pre-installed in
most distributions; otherwise install via
package manager)
■ IDE/Text Editor: Visual Studio Code,
PyCharm, or Nano/Vim for terminal-based
editing
■ Database Tools: MySQL or MariaDB for
databases
Additional Software: apt-get or yum for packages & Pip for Python
dependency management.
14

SOURCE CODE

https://github.com/applxcake/Discord-Bot-Class-12-Cs-project

➔ Full code is available in the public github repository


Contains 1755 Lines (1499 loc)
15

TESTING AND OUTPUT


❖ Some tests with outputs:
16
17

❖ SQL Tables:
18

❖ Testing Process:
➢Unit Tests: Each command was tested
independently.

➢Integration Tests: Combined features were tested for


compatibility.

➢Stress Tests: Assessed performance under heavy


loads.

CONCLUSION

This bot is a practical implementation of Python


programming for interactive Discord bots. It demonstrates the
use of advanced libraries and techniques to create a
multi-feature bot. It highlights the value of structured
development and testing.
19

ADVANTAGES & DISADVANTAGES

❖ ADVANTAGES:

➢Book According to Your Convenience.


➢Plethora of Options to Choose From.
➢Simple and Easy to Use.
➢Saves You Time.

❖ DISADVANTAGES:

➢Internet Access Required


➢Errors in Booking. Unlike booking at a counter,
there's no one to cross-check your details before
confirmation.
➢People unfamiliar with technology or digital
platforms might find it difficult to book tickets
online.
20

STUDENT REFLECTIONS
This experience has been an incredible learning opportunity,
filled with challenges, discoveries, and growth. From the start,
I took responsibility for writing the entire project code.
Developing features required careful planning, creativity, and
problem-solving skills. I ensured each program component
was functional and user-friendly. Debugging was challenging
yet rewarding, teaching me to tackle errors systematically. I
explored details, ran test cases, and sought creative solutions
to ensure the program worked seamlessly, strengthening my
analytical thinking and perseverance. For the database
component, I took it upon myself & found a reliable MySQL
hosting provider, researched solutions, and integrated the
database with my code. This taught me database
management, and scalable hosting. Successfully connecting
the database was a satisfying milestone. This project taught
me coding, time management, and critical thinking, boosting
my confidence and passion for programming. I hope it
inspires others to embrace hands-on learning.

Regards,

G Bala Aditya Reddy


Class XII A
21

BIBLIOGRAPHY
❖ Developmenting Resources:

❖ Learning resources:

➢Computer science With Python - Class XII By


Sumita Arora

❖ Websites:

You might also like