This Python program is a simple pharmacy billing system that allows customers to:
- Enter their phone number to identify themselves.
- Add medicines to their bill by selecting from a predefined list.
- Calculate the total bill based on medicine prices and quantities.
- Earn loyalty points on their purchases.
- Redeem loyalty points to reduce their bill amount in future transactions.
- Phone Number Validation: Ensures the phone number entered is a valid 10-digit number.
- Medicine Selection: Customers can choose medicines from a predefined list with fixed prices.
- Billing Calculation: Calculates the total bill based on the selected medicines and their quantities.
- Loyalty Points System: Accumulates points based on the total bill and allows customers to redeem them.
- Point Redemption: Customers can choose how many points they wish to redeem to reduce their bill amount.
- Clone this repository to your local machine:
git clone <https://github.com/Yash010704/Point_Reedem_System.git>
- Navigate to the directory:
cd pharmacy-billing-system - Ensure Python 3.x is installed on your system.
- Run the script:
python billing_system.py
- Enter your phone number when prompted. The program validates if it’s a 10-digit number.
- Specify the number of medicines you want to purchase. If the number is zero, the program will prompt you to enter a valid value.
- Add medicines by entering their name and quantity. The program calculates the total bill.
- The program awards loyalty points based on your total bill (1 point for every 100 units of currency spent).
- If you return with the same phone number, you can redeem your points to reduce the total bill amount.
- If points are redeemed, the program adjusts the net payable amount and updates the loyalty points balance.
- Enter phone number:
enter the no. 1234567890 - Number of medicines to purchase:
enter the number of medicine:- 2 - Add medicines:
enter the medicine:- A enter the quantity:- 3 enter the medicine:- B enter the quantity:- 2 - Output:
Total pay amount:- 70 Available points: 0 - Redeem points:
Do you want to Redeem point:- Yes how many points you want to redeem, you have balance point is 0 - Final output:
Net amount to be paid after point redemption: 70 Balance points: 0
- List_of_medicine: A dictionary containing medicines and their prices.
- global_sum: Keeps track of the total bill across multiple transactions.
- Loyalty Points: Points are calculated as
total bill / 100, and each point is worth 10 units of currency.
- Case-sensitive medicine names.
- Assumes input is always valid; no error handling for incorrect data types.
- No database for storing loyalty points between runs.
- Add a database to store customer data and loyalty points persistently.
- Implement a user-friendly GUI.
- Include error handling for invalid inputs.
Feel free to fork this repository, make improvements, and submit a pull request. Any suggestions or contributions are welcome!
This project is licensed under the MIT License. See the LICENSE file for more details.