'''
def 함수이름(매개변수):
    함수를 불렀을 때 실행할 명령들
'''
# 매개변수 : 값을 함수 안으로 전달하는 통로
def 안녕(name):
    print(name,"님 안녕하세요!")

#함수이름(전달값)
안녕('주현')
안녕('담미')
안녕('시헌')
안녕('정윤')

def total(a, b):
    print(a + b)

total(7, 3)
total(2025, 1234)

#반환값 : 함수 밖으로 되돌려주는 값
def sub(x, y):
    z = x - y
    return z

print(sub(10, 3))

print('----문제----')
'''
세 값을 전달값으로 하여
전부 곱하고 
그 값을 반환하는 함수 만들기

2 x 3 x 4 의 결과를 출력하는것 까지
'''
def mul(a, b, c):
    d =  a * b * c
    return d

print(mul(2, 3, 4))






Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: