Pre Final
Pre Final
MANAGEMENT
TABLE OF CONTENTS
USE MEDICALSHOPMANAGEMENTSYSTEM;
cursor = db.cursor()
# Main menu
while True:
print("\nMedical Shop Management System Menu:")
print("1. Add Medicine")
print("2. Record Sale")
print("3. Add Customer")
print("4. Generate Sales Report")
print("5. Exit")
PYTHON CODE
choice = input("Enter your choice: ")
if choice == '1'
name = input("Enter the medicine name: ")
manufacturer = input("Enter the manufacturer's name: ")
quantity int(input("Enter the quantity ")) price = float(input("Enter the price per unit: "))
batch_number = input("Enter the batch number: ")
add_medicine(name, man facturer, quantity, price, batch_number) print("Medicine added
successfully!")
elif choice==’2’:
customer id int(input("Enter the customer ID "))
medicine id int(input("Enter the medicine ID: "))
quantity sold int(input("Enter the quantity sold"}}
record_saleicustomer_id,medicine_id, quantity_sold)
print("Sale recorded successfully!")
PYTHON CODE
elif choice == '3':
name = input("Enter the customer's name: ")
phone_number = input("Enter the customer's phone number: ")
email = input("Enter the customer's email: ")
add_customer(name, phone_number, email)
print("Customer added successfully!")
elif choice 5%
print("Exiting the Medical Shop Management System.")
Break
else:
print("Invalid choice. Please try again.")
#Close the database connection
db.close(
PYTHON OUTPUT
CONCLUSION
The “Python MySQL Database Management System” project is a comprehensive
and educational endeavor aimed at introduction class 12th students to the world
of database management and Python programming.Through this project,
students will acquire valuable skills that are not only relevant to their academic
pursuits but also highly sought after in the professional world.
By the end of this project, students will have the knowledge and confidence to
create and manage databases, develop Python application, and present their
work effectively. THis project serves as a stepping stone for students to explore
further opportunities in computer science, data analysis and software
development. It also encourages them to embrace a problem-solving mindset, a
crucial skill in today’s technology-driven society.
BIBLIOGRAPHY
python.org
Codecademy
testbokk.com
pythonchallenge.com
Google’s python class
learnpython.org
geeksforgeeks.com
coderbyte.com