Skip to content
This repository was archived by the owner on Apr 24, 2025. It is now read-only.

Commit 28791d2

Browse files
committed
Fix code style issues with Black
1 parent c90b8d6 commit 28791d2

File tree

2 files changed

+24
-21
lines changed

2 files changed

+24
-21
lines changed

projects/Blind Auction/art.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@
1010
/_________\\
1111
.-------------.
1212
/_______________\\
13-
'''
13+
'''

projects/Blind Auction/main.py

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,34 @@
11
from 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

45
from art import logo
6+
57
print(logo)
68

79
bids = {}
810
bidding_finished = False
911

12+
1013
def 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

2024
while 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

Comments
 (0)