-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathblind_auctions.py
41 lines (30 loc) · 1.08 KB
/
blind_auctions.py
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
31
32
33
34
35
36
37
38
39
40
41
from replit import clear # have to manage with this , clear screen for as the new bidders gat added
logo = '''
___________
\ /
)_______(
|"""""""|_.-._,.---------.,_.-._
| | | | | | ''-.
| |_| |_ _| |_..-'
|_______| '-' `'---------'` '-'
)"""""""(
/_________\\
.-------------.
/_______________\\
'''
print(logo)
bidders = {}
other_bidders = 'yes'
while other_bidders == 'yes':
name = input("What is your name? : ")
bid = int(input("What's your bid? : $ "))
bidders[name] = bid
other_bidders = input("Are there any ohter bidders ? Type 'yes or no' : ")
clear()
winner = ""
highest_bid = 0
for name in bidders:
if bidders[name] > highest_bid:
winner = name
highest_bid = bidders[name]
print(f"The winner is {winner} with a highest bid ${highest_bid}.")