We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a154b9a + 775050e commit 2969388Copy full SHA for 2969388
Games/auction/auction.py
@@ -44,10 +44,17 @@ def calcBid(players):
44
clear()
45
46
print(logo)
47
-# Adds player
+
48
+#Add player
49
bidding = True
50
while bidding:
- name = input("Enter your name\n")
51
+ name = input("Enter your name\n")
52
53
54
+ if name in players:
55
+ print("This name is already taken")
56
+ continue
57
58
while True:
59
bidAmount = input("Enter the bidding amount\n$")
60
if bidAmount.isdigit():
@@ -61,7 +68,6 @@ def calcBid(players):
61
68
62
69
players[name] = bidAmount
63
70
64
-
65
71
cont = (input("Add another player?\nEnter 'Yes' or 'No'\n")).lower()
66
72
67
73
@@ -71,4 +77,4 @@ def calcBid(players):
77
if cont == "no":
78
bidding = False
79
74
-calcBid(players)
80
+calcBid(players)
0 commit comments