반응형
replit에서 화면 초기화하는 방법 -> from replit import clear
from replit import clear
import art
print(art.logo)
dict = {}
flag = True
def find_result(bidding_record):
highest = 0
for bidder in bidding_record:
bid_amount = bidding_record[bidder]
if bid_amount > highest:
highest = bid_amount
winner = bidder
print(f"winner is {winner}, money ${highest}")
while flag:
name = input("What is your name? : ")
bid = int(input("What's your bid?: $"))
dict[name] = bid
other = input("Are there any other bidders? Type 'yes' or 'no'")
if other == "no":
flag = False
find_result(dict)
else:
clear()
for name in dict:
dict[name]
반응형
'파이썬 > exercise' 카테고리의 다른 글
[파이썬] 숫자 맞추기 게임 (0) | 2023.01.26 |
---|---|
10-1. python 딕셔너리와 함수 결합 (0) | 2023.01.05 |
9-2. python dictionary in list (0) | 2023.01.04 |
9-1. python dictionary 성적 등급 매기는 프로그램 (0) | 2023.01.04 |
8-3. python caesar cipher (0) | 2023.01.04 |