Skip to content

Instantly share code, notes, and snippets.

@yunho0130
Created September 18, 2018 07:55
Show Gist options
  • Save yunho0130/77a0cc21b7a9b5cf8f9f8bafc6e9f0e9 to your computer and use it in GitHub Desktop.
Save yunho0130/77a0cc21b7a9b5cf8f9f8bafc6e9f0e9 to your computer and use it in GitHub Desktop.
# -*- coding: utf-8 -*-
"""
Created on Tue Sep 18 16:25:52 2018
@author: HDC_USER
"""
# 함수가 실행되면 리턴값이 존재하므로
# 결과값을 사용할 수 있다.
def mul(val1, val2):
return int(val1)*int(val2)
# 함수 내부에서 계산이 끝나기 때문에
# 결과값을 사용할 수 없다.
def mul2(val1, val2):
print int(val1)*int(val2)
num3 = mul(10, 20)
print mul(num3, 30)
mul2(10,20)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment