This repository contains my accepted solutions to Python challenges on HackerRank.
Each problem was solved with a focus on clarity, correctness, and passing all test cases.
Implements a vending machine that handles item purchases and returns change.
Raises exceptions if:
- There arenβt enough items.
- Not enough coins are inserted.
Implements a shopping cart system with two classes: Item and ShoppingCart.
Supports:
- Adding items (multiple times)
- Calculating total price
- Getting cart length with
len(cart)
- Python 3.x
- Classes & Object-Oriented Programming
- Exception handling
This project is open-source. You may reuse the code for learning and personal projects.