Skip to content

Solutions to Python challenges on HackerRank. Each solution is implemented in clean Python code and passes all test cases.

Notifications You must be signed in to change notification settings

etado/hackerrank-python-solutions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

HackerRank Python Solutions

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.


πŸš€ Problems Solved

1. πŸ₯€ Vending Machine

Implements a vending machine that handles item purchases and returns change.
Raises exceptions if:

  • There aren’t enough items.
  • Not enough coins are inserted.

➑️ See solution

2. πŸ›’ Shopping Cart

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)

➑️ See solution


πŸ›  Technologies Used

  • Python 3.x
  • Classes & Object-Oriented Programming
  • Exception handling

πŸ“œ License

This project is open-source. You may reuse the code for learning and personal projects.

About

Solutions to Python challenges on HackerRank. Each solution is implemented in clean Python code and passes all test cases.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages