로딩
요청 처리 중입니다...

파이썬 챕터5 연습문제

 파이썬 챕터5 연습문제

첨부파일 YSG_Let's Python ch_05 Exercise.py 파일 다운로드 #임성구 #1번 def StarCount (height): cnt=total=0 while cnt < height: cnt += 1 print('*' * cnt) total+=cnt return total height = int(input('height : ')) print('star개수: %d'%StarCount(height)) #2번 def bank_account(bal): balance=bal def getBalance(): return balance def deposit(money): nonlocal balance balance += money print(f'{money}원 입금후 잔액은 {getBalance()}원 입니다.') def withdraw(money): nonlocal balance if balance>=money: balance-= money print(f'{money}원 출금...

# 1번 # 2번 # 3번 # 임성구