A simple Python-based customer membership management system designed for a fictional e-commerce service called PacCommerce. PacCommerce offers three membership tiers — Platinum, Gold, and Silver — each with its own unique benefits and requirements. This program includes functionality for storing a member database, displaying benefits, checking requirements, automatically predicting membership tiers using Euclidean distance, verifying user identities, calculating price discounts, and providing admin-level access for user management.
- Demonstrate proficiency in using object-oriented programming (OOP) to create a Python program.
- Apply clean coding practices following PEP8 guidelines.
- Showcase logical and systematic thinking in problem-solving using Python.
Membership()→ Includes an identity verification feature
Ensures no duplicate user entries and protects data integrity by verifying re-entry of users who were already listed in the database before the program ran.show_benefit()→ Displays benefit descriptions and discount rates for each membership tier.show_requirements()→ Displays monthly income and expense requirements for each tier.predict_membership()→ Automatically assigns a membership tier based on the user's monthly income and expenses using Euclidean distance calculation.show_membership()→ Displays the user's current membership status.calculate_price()→ Calculates the total price after applying the appropriate membership-based discount.
show_all_members()→ Displays all registered members (password protected).remove_member()→ Removes a member from the database (password protected).
- Language: Python 3
- Built-in Modules:
This Python script implements the core customer membership system for PacCommerce. Both users and admins can access all key features mentioned above through this class-based implementation.
This Jupyter Notebook contains structured test cases to validate the paccommerce.py script. It simulates real-world user scenarios and interactions with the membership system, including:
- Viewing membership benefits and requirements
- Predicting the user's membership tier based on income and expenses
- Verifying returning users through identity checks
- Calculating discounted shopping totals
- Admin access to view and remove members securely
- Download both
paccommerce.pyandtest_case_paccommerce.ipynbto your local directory. - Open the notebook file (
.ipynb) using Jupyter Notebook or VSCode (with the Jupyter extension). - Ensure the
paccommerce.pyscript is in the same directory or is properly imported. - Run the notebook cells step by step to explore and test all functionalities.