Skip to content

AJBrohi/undercover-auction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Undercover Auction

This program is a Python implementation of an undercover auction where bidders submit their bids without knowing the bid of other bidders. The program finds the minimum bid greater than or equal to the winning bid and declares the winner.

Rules

  1. The auction is for a single item.
  2. All bidders must submit their bid without knowing the bid of other bidders.
  3. The bid must be greater than or equal to the minimum bid to be considered.
  4. The minimum bid is calculated as the minimum bid greater than or equal to the winning bid.
  5. The winner is the bidder with the MINIMUM BID greater than or equal to the winning bid.

Program Features

This program includes the following features:

  • User input for the number of bidders participating in the auction
  • User input for each bidder's name and bid amount
  • Filtering of bids that are less than the randomly generated winning bid
  • Identification of the winning bidder with the highest bid above the randomly generated winning bid

Python Features

This program utilizes the following Python features:

  • random module for generating a random winning bid
  • User-defined functions for creating a list of bidders, filtering bids, and finding the winning bidder
  • Use of dictionaries to store bidder names and bid amounts
  • Use of loops to iterate over the list of bidders and bids
  • Use of conditional statements to filter bids and determine the winning bidder

How to use

  • Clone the repository to your local machine.
  • Open the terminal and navigate to the directory where the repository is cloned.
  • Run the command python main.py to start the program.
  • Follow the instructions to input the number of bidders and their bids.
  • The program will output the name and the bid of the winner.

Test Run

Undercover Auction

Learn More

I've written a detailed article explaining how this game works and how to run it step-by-step on Medium. Check it out here: Undercover Auction: A Python Game to Test Your Bidding Skills

You can also follow my coding journey on my coding journal From Beginner to Pro: A Python Project Journal of Learning and Innovation, where I share my all projects article.

Thank you for checking out my project!

About

Python Implementation of An Undercover Auction

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages