Skip to content · ⁨본문 바로가기⁩

Bank account · ⁨은행 계좌⁩

English

Bank account

A tiny bank that follows a list of instructions and never lets the balance go below zero.

"deposit 50".split() breaks the string at its spaces into ["deposit", "50"]. The amount is still text, so convert it with int(). Check that there is enough money before a withdrawal changes the balance; a refused withdrawal simply does nothing.

한국어

은행 계좌

명령 목록을 따르고 잔고가 0보다 낮아지지 않는 작은 은행입니다.

"deposit 50".split()은 공백에서 문자열을 ["deposit", "50"]로 쪼개고, 금액은 여전히 텍스트이므로 int()으로 변환합니다. 인출이 잔고를 변경하기 전에 돈이 충분한지 확인하며, 거절된 인출은 아무런 작용도 하지 않습니다.

Log in or create account · ⁨로그인 또는 계정 만들기⁩

IGCSE, A-Level & AP