728x90
반응형
목록반환값 (1)
0w0
[BASIC] 파이썬 함수의 전달값, 반환값
# 함수의 전달값, 반환값 # 별도의 기능을 하는 코드의 구성 # def 함수명(인자): # 입금 def input_money_bot(who,ori_money,input_money): print("{0}의 계좌에 ${1}달러가 입금".format(who,input_money)) print("{0}의 계좌에는 ${1}달러가 있습니다.".format(who,ori_money+input_money)) return ori_money+input_money # 출금 def output_money_bot(who,ori_money,output_money): if ori_money
Coding/Python
2020. 12. 5. 06:40
728x90
반응형