diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index 0812991..0000000 Binary files a/.DS_Store and /dev/null differ diff --git a/log.txt b/log.txt deleted file mode 100644 index f46dc65..0000000 --- a/log.txt +++ /dev/null @@ -1,35 +0,0 @@ -commit 08da4605172acdebe2d143f3119b2fc494e9ec9c -Author: Wind-Explorer -Date: Fri Sep 18 14:40:12 2026 +0800 - - update screenshots - -commit ee697ecd0817cd3844d20091c5d82a76609da6c6 -Author: Wind-Explorer -Date: Fri Sep 18 14:35:08 2026 +0800 - - added modular_auditor.py and updated Dockerfile to use new script - -commit 4bae2ce67d91a3ddf003a7e02694b4ee65d97ea9 -Author: Wind-Explorer -Date: Fri Sep 11 14:20:20 2026 +0800 - - added README with repo link - -commit 692dad6849e6a93c95b23470500e0ec658674e3e -Author: Wind-Explorer -Date: Fri Sep 11 12:34:59 2026 +0800 - - add screenshots - -commit 6fb9105403e08e35766978c7d554c16525382e49 -Author: Wind-Explorer -Date: Fri Sep 11 12:34:27 2026 +0800 - - add dockerfile - -commit 721ad431270886cb85748935e65b90de04001286 -Author: Wind-Explorer -Date: Fri Sep 11 12:21:09 2026 +0800 - - init diff --git a/persist_auditor.py b/persist_auditor.py deleted file mode 100644 index 13efc1b..0000000 --- a/persist_auditor.py +++ /dev/null @@ -1,64 +0,0 @@ -def get_valid_input(): - global failed_attempts - - while True: - user_input = input("Enter stock quantity: ").strip() - - if user_input.lower() == "quit": - return "quit" - - if not user_input.isdigit(): - print("Error: Invalid input. Please enter a non-negative integer.\n") - failed_attempts += 1 - continue - - quantity = int(user_input) - - if quantity < 0: - print("Error: Negative numbers are not allowed.\n") - failed_attempts += 1 - continue - - return quantity - - -def process_delivery(current_total, new_value): - return current_total + new_value - - -def calculate_tax(amount): - return amount * 0.10 - - -def generate_report(total_units, failed_attempts): - print("\n--- Audit Report ---") - print(f"Total Units Processed: {total_units}") - print(f"Failed/Rejected Entries: {failed_attempts}") - - -inventory = 0 -total_units = 0 -failed_attempts = 0 - -print("=== Stock Auditor ===") -print("Type 'quit' to exit.\n") - -while True: - quantity = get_valid_input() - - if quantity == "quit": - break - - tax = calculate_tax(quantity) - - inventory = process_delivery(inventory, quantity) - total_units = process_delivery(total_units, quantity) - - print(f"Stock added. Current inventory: {inventory}") - print(f"Tax on this delivery: ${tax:.2f}\n") - - if inventory > 500: - print(f"ALERT: Overstock detected! Inventory ({inventory}) exceeds 500 units.") - break - -generate_report(total_units, failed_attempts)