11from replit import clear
2- #HINT: You can call clear() to clear the output in the console.
2+
3+ # HINT: You can call clear() to clear the output in the console.
34
45from art import logo
6+
57print (logo )
68
79bids = {}
810bidding_finished = False
911
12+
1013def find_highest_bidder (bidding_record ):
11- highest_bid = 0
12- winner = ""
13- for bidder in bidding_record :
14- bid_amount = bidding_record [bidder ]
15- if bid_amount > highest_bid :
16- highest_bid = bid_amount
17- winner = bidder
18- print (f"The winner is { winner } with a bid of ${ highest_bid } ." )
14+ highest_bid = 0
15+ winner = ""
16+ for bidder in bidding_record :
17+ bid_amount = bidding_record [bidder ]
18+ if bid_amount > highest_bid :
19+ highest_bid = bid_amount
20+ winner = bidder
21+ print (f"The winner is { winner } with a bid of ${ highest_bid } ." )
22+
1923
2024while not bidding_finished :
21- name = input ("What is your name? " )
22- bid = int (input ("What is your bid? $" ))
23- bids [name ] = bid
24-
25- should_continue = input ("Are there any other bidders? Type 'yes' or 'no': " ).lower ()
26- if should_continue == "no" :
27- find_highest_bidder (bids )
28- bidding_finished = True
29- elif should_continue == "yes" :
30- clear ()
31-
25+ name = input ("What is your name? " )
26+ bid = int (input ("What is your bid? $" ))
27+ bids [name ] = bid
28+
29+ should_continue = input ("Are there any other bidders? Type 'yes' or 'no': " ).lower ()
30+ if should_continue == "no" :
31+ find_highest_bidder (bids )
32+ bidding_finished = True
33+ elif should_continue == "yes" :
34+ clear ()
0 commit comments