A simple Secret Auction program built with Python.
This project allows multiple bidders to enter their bids anonymously and uses a dictionary to store the bids. At the end of the auction, the program determines and displays the bidder with the highest bid.
- ๐จ Secret auction system
- ๐ค Multiple bidders
- ๐ฐ Bid collection and storage using a Python dictionary
- ๐ Automatically finds the highest bidder
- ๐งน Clears the console between bidders
- ๐ก๏ธ Handles invalid bid input using
try/except - ๐ฅ๏ธ Works on Windows, Linux, and macOS
This project was created to practice fundamental Python concepts:
- Dictionaries
- Functions
forloopswhileloops- Conditional statements
- User input
try/except- The
osmodule - Basic program flow
Make sure Python 3 is installed on your system.
Clone the repository:
git clone https://github.com/Ramtinexe/python-secret-auction.gitNavigate to the project folder:
cd python-secret-auctionRun the program:
python main.py- Enter your name.
- Enter your bid.
- Choose whether there are other bidders.
- If there are more bidders, the console is cleared.
- When there are no more bidders, the program finds the highest bid.
- The winner and their bid are displayed.
python-secret-auction/
โ
โโโ main.py
โโโ README.md
Welcome to the secret auction program!
Please enter your name: Ramtin
Please enter your bid: $ 100
Are there any other bidders? (y/n) y
Please enter your name: Alex
Please enter your bid: $ 150
Are there any other bidders? (y/n) n
The winner is Alex with a bid of $150
This is a beginner-friendly Python project created as part of my practice with Python fundamentals and data structures.
Ramtin
GitHub: @Ramtinexe