여러가지/Python

Day 6 - 사용자 함수 정의(def), 함수 호출, while 반복문

15June 2023. 12. 8. 14:28

● 학습 내용

 

1) 함수 정의

def introduce():
  print("Hello, I'm June")
  print("What's your name?")

 

2) 함수 호출
introduce()

 

3) while 반복문

while num>0(조건):

  print("Hello, I'm June")
  print("What's your name?")

  num -= 1

 

(+) at_goal() != True  ==  not at_goal()