-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBidder.py
More file actions
30 lines (25 loc) · 825 Bytes
/
Bidder.py
File metadata and controls
30 lines (25 loc) · 825 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
from replit import clear
from Bid_art import logo
print(logo)
bids =
bidding_finished = False
def find_highest(bidding_record):
highest_bid = 0
winner = ""
for bidder in bidding_record:
bid_amount = bidding_record[bidder]
if bid_amount > highest_bid:
highest_bid = bid_amount
winner = bidder
print(f"The winner is {winner} with a bid of ${highest_bid}")
while not bidding_finished:
name = input("Enter your name:")
price = int(input("Enter the bid price in PKR: RS"))
#price1 = (f"{price}RS.")
bids[name] = price
should_continue = input("Are there any other bidders: Type 'yes' or 'no' ")
if should_continue == "no":
bidding_finished = True
find_highest(bids)
elif should_continue == "yes":
clear()