티스토리 뷰
from art import logo #텍스트 아트를 별도의 art.py에 logo 변수로 두고 읽어왔음
from replit import clear #화면 지우기의 일반적인 함수를 모르겠음
print(logo)
print("Welcome to the secret auction program.")
bidding = {} #딕셔너리와 리스트/딕셔너리, 리스트간 무엇을 사용할지 결정하는데 시간소비함
repeat = True
while repeat:
ones_name = input("What is your name?: ")
ones_bid = int(input("What's your bid?: $"))
bidding[ones_name] = ones_bid
if input("Are there any other bidders? Type 'yes' or 'no'.") == "no":
repeat = False
else:
clear()
max_bid = 0
for key in bidding:
if bidding[key] > max_bid:
winner_name = key
max_bid = bidding[key]
print(f"The winner is {winner_name} with a bid of ${max_bid}.")
'Test > Python(20220101~)' 카테고리의 다른 글
Days10_Docstrings in Functions (0) | 2022.01.15 |
---|---|
Days10_Functions with Outputs (0) | 2022.01.14 |
Days9_리스트 속 딕셔너리에 데이터 추가 (0) | 2022.01.13 |
Days9_Lists, Dictionary 중첩 (0) | 2022.01.13 |
Day9_Dictionary, 점수를 가지고 등급 매기는 프로그램 (0) | 2022.01.12 |
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- powercli
- exadata
- oracle
- insert
- 3par
- dp-2
- 읽어오기
- virt-sysprep
- set()
- cloud-init
- dp-1
- EXA
- sysprep
- 중복제거
- 차집합
- storage
- 대소문자
- powershell
- fromkeys
- 변수화
- vmware.powercli
- 정렬
- 배열
- 부동없이
- LIST
- artandculture
- vmware
- Join
- 스토리지
- dezoomify
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함