MCPcopy Create free account
hub / github.com/Mrinank-Bhowmick/python-beginner-projects / compare

Function compare

projects/Blind_Auction/main.py:14–22  ·  view source on GitHub ↗
(bidding_record)

Source from the content-addressed store, hash-verified

12
13# Function to compare the bids and find the highest bidder
14def compare(bidding_record):
15 highest_bidder = 0
16 winner = " "
17 for bidder in bidding_record:
18 bid_amount = bidding_record[bidder]
19 if bid_amount > highest_bidder:
20 highest_bidder = bid_amount
21 winner = bidder
22 print(f"The winner is {winner} with the highest bid of {highest_bidder}.")
23
24
25# Main loop for the bidding process

Callers 1

main.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected