msg = """
d:합산 w:차감 q:루프 탈출 나머지:?
    
method:"""
bal = 0
while True:
    x = input(msg)
    if x == "d":
        money = input("Amount:")
        bal += int(money)
        print("Balance:", bal)
    elif x == "w":
        money = input("Amount:")
        bal -= int(money)
        print("Balance:", bal)
    elif x == "q":
        break
    else:
        print("?")

10819f5bc0e0eeb69257ea5c9e1dc8710597137e
<mask token>

<mask token>
while True:
    x = input(msg)
    if x == 'd':
        money = input('Amount:')
        bal += int(money)
        print('Balance:', bal)
    elif x == 'w':
        money = input('Amount:')
        bal -= int(money)
        print('Balance:', bal)
    elif x == 'q':
        break
    else:
        print('?')

msg = """
d:합산 w:차감 q:루프 탈출 나머지:?
    
method:"""
bal = 0
while True:
    x = input(msg)
    if x == 'd':
        money = input('Amount:')
        bal += int(money)
        print('Balance:', bal)
    elif x == 'w':
        money = input('Amount:')
        bal -= int(money)
        print('Balance:', bal)
    elif x == 'q':
        break
    else:
        print('?')

msg = """
d:합산 w:차감 q:루프 탈출 나머지:?
    
method:"""
bal = 0
while True:
    x = input(msg)
    if x == "d":
        money = input("Amount:")
        bal += int(money)
        print("Balance:", bal)
    elif x == "w":
        money = input("Amount:")
        bal -= int(money)
        print("Balance:", bal)
    elif x == "q":
        break
    else:
        print("?")
