-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathauction.py
More file actions
28 lines (26 loc) · 756 Bytes
/
auction.py
File metadata and controls
28 lines (26 loc) · 756 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
#from replit import clear
#HINT: You can call clear() to clear the output in the console.
# from art import logo
#print(f"{logo}\n Welcome to the secret auction program.")
ledger = {}
again = True
def auctioneer (again):
winning_bid = 0
winner = ""
while again:
nama = input("What is your name? ")
amount = int(input("How much are you bidding? $"))
ledger[nama] = amount
if input("Are there any more bidders? yes/no \n") == "yes":
#clear()
continue
else:
for key in ledger:
if ledger[key] > winning_bid:
winning_bid = ledger[key]
winner = key
else:
continue
print (f"The winner is {winner}.")
again = False
auctioneer(again)