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

finall python project is done 1 (1) (1)

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

finall python project is done 1 (1) (1)

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

A Project Report

on

USER AUTHENTICATION SYSTEM

Submitted in partial fulfilment of requirements for the award of the course

of

CGB1121 – PYTHON PROGRAMMING

Under the guidance of

Mrs. M.MYTHILI M.E.,

Assistant Professor/IT

Submitted By

VARSHINI S (927623BIT123)

DEPARTMENT OF FRESHMAN ENGINEERING

M.KUMARASAMY COLLEGE OF ENGINEERING


(Autonomous)

KARUR – 639 113

MAY 2024
M. KUMARASAMY COLLEGE OF ENGINEERING

(Autonomous Institution affiliated to Anna University, Chennai)

KARUR – 639 113

BONAFIDE CERTIFICATE

Certified that this project report on “USER AUTHENTICATION SYSTEM ” is


the bonafide work of VARSHINI S (927623BIT123) who carried out the project
work during the academic year 2023- 2024 under my supervision.

Signature Signature
Mrs.M.MYTHILI, M.E., Dr. K.CHITIRAKALA, M.Sc.,
M.Phil.,Ph.D.,

SUPERVISOR, HEAD OF THE DEPARTMENT,

Department of Information Technology, Department of Freshman Engineering,


M. Kumarasamy College of Engineering, M. Kumarasamy College of Engineering,
Thalavapalayam, Karur -639 113. Thalavapalayam, Karur -639 113.
DECLARATION

I declare that the project report on “USER AUTHENTICATION SYSTEM” is the


result of original work done by us and best of our knowledge, similar work has not
been submitted to “ANNA UNIVERSITY CHENNAI” for the requirement of
Degree of BACHELOR OF TECHNOLOGY. This project report is submitted on
the partial fulfilment of the requirement of the completion of the course CGB1121-
PYTHON PROGRAMMING.

SIGNATURE
--------------------------
VARSHINI S

Place:Karur
Date:
ACKNOWLEDGEMENT

It is with great pride that I express our gratitude and in-debt to our institution “
M.Kumarasamy College of Engineering (Autonomous)”, for providing us with
the opportunity to do this project.
I glad to credit honourable chairman Dr. K. RAMAKRISHNAN, B.E., for having
provided for the facilities during the course of our study in college.
I would like to express our sincere thanks to our beloved Executive Director
Dr. S. KUPPUSAMY, MBA, Ph.D., for forwarding to our project and offering
adequate duration in completing our project.
I would like to thank Dr. B.S. MURUGAN., Principal, who gave opportunity to
frame the project the full satisfaction.
I whole heartily thanks to Dr. S. GEEITHA M.E., Ph.D., Head of the department,
INFORMATION TECHNOLOGY for providing her encourage pursuing this
project.
I express our deep expression and sincere gratitude to our project guide Mrs.
M.MYTHILI. M.E., Department of INFORMATION TECHNOLOGY, for his
incalculable suggestions, creativity, assistance and patience which motivated us to
carry out this project.
I render our sincere thanks to Course Coordinator and other staff members for
providing valuable information during the course.
I wish to express our special thanks to the officials and Lab Technicians of our
departments who rendered their help during the period of the work progress.
DEPARTMENT OF INFORMATION TECHNOLOGY

VISION OF THE INSTITUTION


To emerge as a leader among the top institutions in the field of technical education
MISSION OF THE INSTITUTION

 Produce smart technocrats with empirical knowledge who can surmount the global
challenges
 Create a diverse, fully-engaged, learner-centric campus environment to provide
quality education to the students
 Maintain mutually beneficial partnerships with our alumni, industry, and
Professional associations

VISION OF THE DEPARTMENT

To create groomed, technically competent and skilled intellectual IT professionals


to meet the current challenges of the modern computing industry.
MISSION OF THE DEPARTMENT

 To ensure the understanding of fundamental aspects of Information Technology.

 Prepare students to adapt to the challenges of changing market needs by providing


an environment.

 Build necessary skills required for employ ability through career development
training to meet the challenges posed by the competitive world.
PROGRAM EDUCATIONAL OBJECTIVES (PEOs)

PEO 1: Graduates will be able to solve real world problems using learned concepts pertaining
to Information Technology domain.

PEO 2: Encompass the ability to examine, plan and build innovative software Products and
become a successful entrepreneur.
PEO 3: Graduates will be able to carry out the profession with ethics, integrity, leadership and
social responsibility.

PEO 4: Graduates will be able to pursue post-graduation and succeed in academic and research
careers.
PROGRAM OUTCOMES (POs)
Engineering students will be able to:
1. Engineering knowledge: Apply the knowledge of mathematics, science, engineering
fundamentals, and an engineering specialization to the solution of complex engineering
problems.
2. Problem analysis: Identify, formulate, review research literature, and analyze complex
engineering problems reaching substantiated conclusions using first principles of
mathematics, natural sciences, and engineering sciences.
3. Design/development of solutions: Design solutions for complex engineering problems
and design system components or processes that meet the specified needs with appropriate
consideration for the public health and safety, and the cultural, societal, and
environmental considerations.
4. Conduct investigations of complex problems: Use research-based knowledge and
research methods including design of experiments, analysis and interpretation of data, and
synthesis of the information to provide valid conclusions.
5. Modern tool usage: Create, select, and apply appropriate techniques, resources, and
modern engineering and IT tools including prediction and modeling to complex
engineering activities with an understanding of the limitations.
6. The engineer and society: Apply reasoning informed by the contextual knowledge to
assess societal, health, safety, legal and cultural issues and the consequent responsibilities
relevant to the professional engineering practice.
7. Environment and sustainability: Understand the impact of the professional engineering
solutions in societal and environmental contexts, and demonstrate the knowledge of, and
need for sustainable development.
8. Ethics: Apply ethical principles and commit to professional ethics and responsibilities
and norms of the engineering practice.
9. Individual and team work: Function effectively as an individual, and as a member or
leader in diverse teams, and in multidisciplinary settings.
10. Communication: Communicate effectively on complex engineering activities with the
engineering community and with society at large, such as, being able to comprehend and
write effective reports and design documentation, make effective presentations, and give
and receive clearinstructions

11. Project management and finance: Demonstrate knowledge and understanding of the
engineering and management principles and apply these to one’s own work, as a member
and leader in a team, to manage projects and in multidisciplinary environments.
12. Life-long learning: Recognize the need for, and have the preparation and ability to
engage in independent and life-long learning in the broadest context of technological
change.

PROGRAM SPECIFIC OUTCOMES (PSOs)

1. PSO1: Professional Skills: Comprehend the technological advancement and practice


professional ethics and the concerns for societal and environmental well-being.

2. PSO 2: Competency Skills: Design software in a futuristic approach to support current


technology and adapt cutting-edge technologies.

3. PSO 3: Successful career: Apply knowledge of theoretical computer science to assess the
hardware and software aspects of computer systems.
ABSTRACT
This Python program is designed to manage doctor-patient appointments at
Thanush Multi Specialist Hospital. It initializes a list of doctors with details such as
name, profession, specialty, available seats, and working hours. Patients can book
appointments by selecting a preferred doctor and receive a unique token number. The
program converts the current time from UTC to IST for accurate appointment details.
Additionally, patients can cancel appointments by providing their token number,
which frees up seats for other patients. A menu-driven interface allows users to book
appointments, cancel appointments, or exit the system.
TABLE OF CONTENTS

CHAPTER TITLE PAGE NO.


ABSTRACT Ix
LIST OF FIGURES Xi
LIST OF ABBREVIATIONS Xii
1 INTRODUCTION
1.1. Introduction to Python 1
1.1.1. Overview 1
1.1.2. Programming Paradigms 1
1.1.3. Standard Library 1
1.1.4. Third-Party Libraries and Frameworks 1
1.1.5. Versions of Python 1
1.1.6. Python Tools 2
1.1.7. Versatility and Adoption 2
2 PROJECT DESCRIPTION
2.1. Project Introduction 3
2.1. Project Objective 3
2.3. Problem Statement 4

3 SYSTEM ANALYSIS
3.1. Existing System 5
3.1.1. Disadvantages 5
3.2 Proposed System 6
3.2.1. Advantage 6
4 SYSTEM DESIGN & MODULES
4.1. Block Diagram 8
4.2. Module Description 9
4.2.1. Input Choice 9
4.2.1.1. Book Appointment 9
4.2.1.2. Cancel Appointment 9
4.2.1.3 Exit 9
9
5 CONCLUSION & FUTURE ENHANCEMENT
5.1. Conclusion 10
5.2. Future Enhancement 10
6 APPENDICES
Appendix A-Source code 12
Appendix B -Screen shots 14

LIST OF FIGURES

FIGURE NO TITLE PAGE NO.

4.1 BLOCK DIAGRAM 8


LIST OF ABBREVIATIONS

ABBREVIATIONS

IDE - Integrated development environment


VS Code - Visual Studio Code
re - Regular Expression
iOS - iPhone Operating System
NLP - Natural Language Processing
GUI - Graphical User Interface
APIs - Application Programming Interface
CHAPTER 1
INTRODUCTION
1.1 INTRODUCTION TO PYTHON
1.1.1. OVERVIEW
Python is a widely-used, high-level programming language renowned for its readability and
simplicity, making it an ideal choice for both novice and seasoned programmers. Created by Guido
van Rossum and released in 1991, Python's core philosophy emphasizes code readability and
straightforward syntax, allowing developers to write clear and concise code more efficiently
compared to other languages like C++ or Java.

1.1.2. PROGRAMMING PARADIGMS


Python supports various programming paradigms, including procedural, object-oriented, and
functional programming. This flexibility, combined with a dynamic type system and automatic
memory management, facilitates the development of a wide range of applications, from simple
scripts to complex software systems.

1.1.3. STANDARD LIBRARY


The language's comprehensive standard library, often referred to as "batteries-included," provides
built-in modules and functions for handling many programming tasks, such as file I/O, system calls,
and even web services. This extensive library helps streamline the development process by offering
ready-to-use solutions for common programming challenges.

1.1.4. THIRD-PARTY LIBRARIES AND FRAMEWORKS


One of Python's significant strengths is its extensive ecosystem of third-party libraries and
frameworks. Popular libraries such as NumPy and Pandas enable efficient data manipulation and
analysis, while frameworks like Django and Flask streamline web development. In the realm of
machine learning and artificial intelligence, libraries like TensorFlow and PyTorch are widely
adopted for building and deploying sophisticated models.

1.1.5. VERSIONS OF PYTHON


Python has undergone significant evolution since its inception, with two major versions in use
today:
Python 2: Released in 2000, Python 2.x series was a major milestone and widely used for many
years. However, it reached its end of life on January 1, 2020, and is no longer maintained.
Python 3: Introduced in 2008, Python 3.x series brought substantial improvements and changes to
the language, such as better Unicode support, a more consistent syntax, and enhanced standard
libraries. Python 3 is the recommended version for all new projects.

1.1.6. PYTHON TOOLS


Python's ecosystem includes numerous tools that enhance productivity and development
experience:

 IDEs and Code Editors: Popular options include PyCharm, VS Code, and Jupyter
Notebook, which offer features like syntax highlighting, code completion, and debugging.

 Package Management: Tools like pip and conda facilitate the installation and management
of Python libraries and dependencies.

 Virtual Environments: virtualenv and venv allow developers to create isolated


environments for different projects, ensuring dependency conflicts are avoided.

 Testing Frameworks: unittest, pytest, and nose are commonly used for writing and running
tests to ensure code reliability and correctness.

 Build Tools: setuptools and wheel help in packaging Python projects, making them easy to
distribute and install.

 Documentation Generators: Tools like Sphinx are used to create comprehensive


documentation for Python projects.

 Linters and Formatters: pylint, flake8, and black help maintain code quality and
consistency by enforcing coding standards and formatting.

1.1.7. VERSATILITY AND ADOPTION


Python's simplicity and versatility have led to its widespread adoption in various fields,
including web development, data science, artificial intelligence, automation, and scientific
computing. Its active community continually contributes to a rich repository of resources, tutorials,
and documentation, making it easier for developers to learn and apply Python effectively.

CHAPTER 2
PROJECT DESCRIPTION
2.1. PROJECT INTRODUCTION
The Doctor-Patient Appointment System in Python allows patients to book and cancel
appointments with doctors at Thanush Multi Specialist Hospital. It manages doctor details
including name, profession, specialty, available seats, and timings. The system provides
real-time appointment booking by converting UTC to IST and generates unique token
numbers for each appointment. Patients can cancel appointments using their token numbers,
updating seat availability. A user-friendly menu interface facilitates easy navigation. While
basic, this project can be expanded with features like online payment integration and
automated reminders for enhanced functionality.

2.2. PROJECT OBJECTIVE


The objectives of the Doctor-Patient Appointment System in Python project are to create an
efficient and user-friendly platform for managing medical appointments at Thanush Multi
Specialist Hospital. The system aims to facilitate the booking of appointments by allowing
patients to view detailed information about available doctors, including their specialties and
working hours, and to schedule appointments in real-time with unique token numbers
generated for each booking. It seeks to ensure accurate time management by converting
UTC to Indian Standard Time (IST) and to provide a robust cancellation mechanism that
updates seat availability upon appointment cancellation. The project features a menu-driven
interface for easy navigation, enabling users to book or cancel appointments or exit the
system. Future enhancements may include online payment integration and automated
reminders to improve functionality. The design emphasizes modularity, allowing for easy
integration of additional features and extensions, such as advanced database management
and notification systems. Comprehensive documentation and feedback mechanisms are
provided to ensure ease of use and understanding for both developers and users.

2.3. PROBLEM STATEMENT


The problem at hand is to develop a reliable and user-friendly doctor-patient appointment
system in Python for Thanush Multi Specialist Hospital. This system should enable patients
to view available doctors along with their specialties, timings, and seat availability,
facilitating informed and convenient appointment bookings. Upon selecting a doctor, the
system should generate a unique token number for each appointment, ensuring accurate
tracking and preventing double bookings. Additionally, the system should allow patients to
cancel appointments easily using their token number, automatically updating seat
availability. The interface must be intuitive, offering a menu-driven approach for easy
navigation between booking, canceling, and exiting the application. Accurate time
management is essential, converting UTC to Indian Standard Time (IST) to prevent
scheduling conflicts. By addressing these challenges, the project aims to enhance the
efficiency of appointment management at the hospital, improving both patient experience
and operational workflow.

CHAPTER 3

SYSTEM ANALYSIS

3.1. EXISTING SYSTEM


The current appointment management system at Thanush Multi Specialist Hospital relies on
manual booking and cancellation, leading to errors and inefficiencies. Patients book
appointments by calling or visiting in person, causing potential miscommunications and
overbookings. Doctor availability and schedules are managed manually, lacking real-time
updates. Cancellations and rescheduling are also handled manually, causing delays and
confusion. This manual process results in double bookings, missed appointments, and
inaccurate records. It is time-consuming for staff and inconvenient for patients, who struggle
to obtain timely appointments and clear information. Therefore, an efficient, user-friendly
system is needed to streamline appointment management and improve the patient
experience.

3.1.1. DISADVANTAGES
1. Security Risks: Depending on implementation, Python-based appointment systems may
be vulnerable to security threats such as SQL injection and session hijacking if robust
security measures are not enforced.
2. Scalability Challenges: As appointment databases expand, the performance of Python-
based systems may decline, resulting in slower response times and increased resource
consumption.
3. Limited Features: Basic appointment systems implemented solely in Python may lack
advanced features such as multi-factor authentication and comprehensive logging
capabilities.
4.Dependency on External Libraries: Certain functionalities like password hashing may
require external libraries, introducing potential security risks and compatibility issues.
5. Maintenance Overhead: Python-based appointment systems necessitate ongoing
maintenance to address security vulnerabilities and incorporate new features, increasing
maintenance overhead.
6. Platform Dependency: Python-based systems may rely on specific runtime
environments, limiting deployment options and increasing complexity.
7. Complexity of Implementation: Developing a secure and efficient appointment system in
Python demands a deep understanding of security principles and web application
development, posing challenges for inexperienced developers.
8. Performance Overhead: Security features like password hashing may introduce
performance overhead, impacting system response times and user experience.

3.2. PROPOSED SYSTEM


The proposed appointment management system aims to revolutionize the current manual
process by introducing automation, real-time updates, and user-friendly features. It will
streamline appointment booking and cancellation processes, reducing errors and improving
efficiency. Integration with digital platforms will enable patients to book appointments
online, check doctor availability, and receive appointment reminders. The system will also
facilitate better management of doctor schedules, ensuring optimal utilization of resources.
Additionally, features like patient feedback collection and analytics will enhance patient
satisfaction and operational effectiveness. Overall, the proposed system will modernize
appointment management, providing a seamless experience for both patients and hospital
staff.

3.2.1. ADVANTAGES
1. Streamlined Appointment Booking: The system simplifies the process of booking
appointments by providing a user-friendly interface and displaying available doctors and
their schedules.
2.Efficient Resource Management: By managing doctor schedules and available seats, the
system optimizes resource allocation and ensures efficient utilization of hospital resources.
3. Improved Patient Experience: Patients benefit from reduced wait times and increased
convenience when booking appointments, enhancing their overall experience with the
healthcare facility.
4. Enhanced Organization: The system enhances the organization of patient appointments by
centralizing booking information and facilitating easy access for hospital staff.
5. Real-Time Updates: Doctors and patients receive real-time updates on appointment
bookings and cancellations, minimizing confusion and improving communication.
6. Increased Accessibility: The system improves accessibility for patients by providing
multiple channels for appointment booking, including in-person and remote options.
7. Data Security: Patient data is securely stored and managed, ensuring confidentiality and
compliance with data protection regulations, thereby enhancing trust and confidence in the
healthcare provider.
8. Scalability: The system can accommodate the growth of the hospital and adapt to changes
in patient demand, ensuring scalability and long-term viability.
CHAPTER 4

SYSTEM DESIGN & MODULES

4.1. BLOCK DIAGRAM

Fig 4.1 block diagram

4.2. MODULE DESCRIPTION

4.2.1 Input Choice:


At the main menu, the program prompts the user to input their choice by entering a
number (1, 2, or 3) corresponding to the action they want to perform: booking an
appointment, canceling an appointment, or exiting the system. This input choice
allows the user to navigate through the functionalities of the appointment system
efficiently.

4.2.1.1 Book Appointment


When the user selects the option to book an appointment, the program guides them
through the process step by step. First, it prompts the user to enter their name. Then,
it retrieves the current time in UTC and converts it to Indian Standard Time (IST).
After displaying the available doctors along with their information, the program
prompts the user to choose their preferred doctor by entering the corresponding
number. If the selected doctor has available seats, the program generates a unique
token number for the appointment, updates the doctor's appointments dictionary with
the patient's name, decrements the available seats, and confirms the booking by
printing the appointment details along with the token number. If the selected doctor
has no available seats, the program notifies the user accordingly.

4.2.1.2 Cancel Appointment


When the user chooses to cancel an appointment, the program prompts them to input
the token number associated with their appointment. It then iterates through the
appointments of all doctors to find the appointment with the entered token number. If
the appointment is found, the program removes it from the doctor's appointments
dictionary, increments the available seats for that doctor, and confirms the
cancellation by printing a message. If the entered token number is invalid or does not
match any appointment, the program notifies the user with an error message.

4.2.1.3 Exit
If the user decides to exit the appointment system, the program prints a thank you
message and terminates its execution. This option allows users to gracefully end their
interaction with the system when they have completed their tasks or no longer wish to
use it.
CHAPTER 5

CONCLUSION & FUTURE ENHANCEMENT

5.1. CONCLUSION

In conclusion, the Doctor-Patient Appointment System offers a convenient way to manage


appointments at Thanush Multi Specialist Hospital. While it effectively allows users to book
and cancel appointments, several areas for improvement exist.

The system lacks robust error handling, leading to potential issues with invalid inputs.
Additionally, scalability concerns may arise as the user database grows, impacting
performance. Integration with advanced features like reminders and patient history tracking
could enhance the system's functionality and user experience.

Despite these limitations, the system provides a solid foundation for appointment
management, with potential for further development and refinement to meet evolving user
needs and technological advancements.

5.2. FUTURE ENHANCEMENT

In considering the Doctor-Patient Appointment System for future enhancements, several


opportunities emerge to elevate its security, usability, and performance. These
enhancements encompass implementing robust password hashing methods to fortify user
credentials against unauthorized access, integrating multi-factor authentication options like
SMS verification or biometric authentication to augment login security, and incorporating
social login integration for smoother registration experiences. Additionally, adding account
recovery mechanisms such as password reset links or security questions could streamline
user access management. Strengthening logging and monitoring functionalities would
enable comprehensive user activity tracking, enhancing auditing and compliance efforts.
Employing automated testing strategies would bolster system reliability and security by
proactively identifying and addressing potential vulnerabilities. Improving the user interface
with intuitive design principles and informative error messaging could enhance overall user
experience and satisfaction. Finally, optimizing system performance through caching, load
balancing, and database query optimization would ensure smooth operation, even during
periods of high user demand. These enhancements collectively aim to fortify the Doctor-
Patient Appointment System, ensuring its effectiveness and reliability in meeting the needs
of patients and healthcare providers alike.

APPENDICES

APPENDIX A-SOURCE CODE

import datetime
import pytz
import random

# Doctor-patient appointment system with menu (display doctors by number)

# Initialize doctor information with different timings for each doctor


doctors = {
1: {"name": "Dr. Priya Sharma", "profession": "General Physician",
"specialty": "Internal Medicine", "seats": 5, "timings": "9:00am-
1:00pm, 3:00pm-5:00pm", "appointments": {}},
2: {"name": "Dr. Rajesh Patel", "profession": "Cardiologist", "specialty":
"Heart Diseases", "seats": 5, "timings": "10:00am-12:00pm, 4:00pm-
8:00pm", "appointments": {}},
3: {"name": "Dr. Ananya Gupta", "profession": "Dermatologist",
"specialty": "Skin Disorders", "seats": 5, "timings": "8:00am-11:00am,
1:00pm-4:00pm", "appointments": {}},
4: {"name": "Dr. Sanjay Kumar", "profession": "Orthopedic Surgeon",
"specialty": "Musculoskeletal System", "seats": 5, "timings":
"11:00am-2:00pm, 5:00pm-9:00pm", "appointments": {}}
}

hospital_name = "Thanush Multi Specialist Hospital"


hospital_address = "3rd Sengunthapuram, Karur-639002"

def display_hospital_info():
print(f"Welcome to {hospital_name}!")
print(f"Hospital Address: {hospital_address}\n")

def display_doctors():
print("Available Doctors:")
for num, doctor_info in doctors.items():
print(f"{num}. {doctor_info['name']} ({doctor_info['profession']},
{doctor_info['specialty']}) - {doctor_info['seats']} seats available")
print(f" Timings: {doctor_info['timings']}")

def generate_token():
return random.randint(1000, 9999)

def book_appointment():
patient_name = input("Enter your name: ")

# Get the current time in UTC


current_datetime_utc = datetime.datetime.now(pytz.utc)

# Convert the current time to Indian Standard Time (IST)


ist_timezone = pytz.timezone('Asia/Kolkata')
current_datetime_ist = current_datetime_utc.astimezone(ist_timezone)

appointment_date = current_datetime_ist.strftime("%Y-%m-%d")
appointment_time = current_datetime_ist.strftime("%H:%M:%S")

display_doctors()
try:
selected_num = int(input("Enter the number of your preferred doctor: "))
if selected_num in doctors:
preferred_doctor = doctors[selected_num]["name"]
available_seats = doctors[selected_num]["seats"]
if available_seats > 0:
token_number = generate_token()
doctors[selected_num]["appointments"][token_number] =
patient_name
doctors[selected_num]["seats"] -= 1
print(f"Appointment booked for {patient_name} with
{preferred_doctor} on {appointment_date} at {appointment_time}.")
print(f"Your token number is: {token_number}")
print(f"Remaining seats for {preferred_doctor}:
{doctors[selected_num]['seats']}")
else:
print(f"Sorry, no more seats available for {preferred_doctor}.")
else:
print("Invalid doctor number. Please choose a valid number.")
except ValueError:
print("Invalid input. Please enter a valid number.")

def cancel_appointment():
token_number = int(input("Enter your token number: "))
for doc_id, doctor_info in doctors.items():
if token_number in doctor_info["appointments"]:
patient_name = doctor_info["appointments"].pop(token_number)
doctor_info["seats"] += 1
print(f"Appointment for {patient_name} with {doctor_info['name']} has
been canceled.")
print(f"Remaining seats for {doctor_info['name']}:
{doctor_info['seats']}")
return
print("Invalid token number. Please try again.")

# Main menu
while True:
display_hospital_info()
print("Doctor-Patient Appointment System")
print("1. Book an appointment")
print("2. Cancel an appointment")
print("3. Exit")
choice = input("Enter your choice (1/2/3): ")

if choice == "1":
book_appointment()
elif choice == "2":
cancel_appointment()
elif choice == "3":
print("Thank you for using the appointment system. Have a great day!")
break
else:
print("Invalid choice. Please select 1, 2, or 3.")
APPENDIX B -SCREEN SHOTS

I Enter Your Choice


1 Book Appointment
1.1 Enter Your Details And Select The Prefered Doctor

1.2 Book the Appointment with Doctor and Get the Token Number
2 Cancel Appointent

2.1 Enter the Token Number And Cancel the Appointment


3 Exit

You might also like