#함수 : 특정 기능을 실행하는 코드 또는 코드의 모임
#내장 함수 : len(), int(), str(), print(), input()

#사용자 정의 함수(내가 만드는 함수)
'''
def 함수이름(매개변수=함수 안에서 사용하는 변수):
    함수를 불렀을 때 실행할 명령들
'''

def 라면_만들기():
    print('냄비에 물을 넣는다')
    print('물을 끓인다')
    print('면과 스프를 넣는다')
    print('계란을 넣는다')
    print('그릇에 담는다')

라면_만들기()
라면_만들기()

#매개변수 =함수 안에서 사용하는 변수
def 안녕(name):
    print(name + '아, 안녕!')

안녕('기범')
안녕('이랑')

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

total(1273,3242)
total(831,213)

print('----문제1----')
def mul(a,b,c):
    print(a * b * c)

mul(15,4,8)

print('----문제2----')
def 점수(score):
    if score >= 60:
        print("합격입니다")
    else:
        print("불합격입니다")

점수(50)
점수(60)








Embed on website

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