목록Function (2)
IT is Smart
1. 파이썬 소개, Introduction to Python2. 파이썬의 특징, Features of Python (1/2)2. 파이썬의 특징, Features of Python (2/2)3. 파이썬 설치하기, Python Setup3.1 파이썬 버전 선택하기, Select Python version3.2 OS Bit 버전 선택하기, Select OS Bit3.3 설치파일 형태 선택하기, Select Setup File3.4 설치하기, Setup (1/2)3.4 설치하기, Setup (2/2)4.1 파이썬 Interactive Shell 사용하기 (1/3)4.1 파이썬 Interactive Shell 사용하기 (2/3)4.1 파이썬 Interactive Shell 사용하기 (3/3)4.2 파이썬 File..
이번에는 return을 사용하는 함수 예제를 확인해보겠습니다. 파이썬 IDLE를 실행한 후 편집기를 열고 코드를 따라해보세요. def allowed_dating_age(my_age): girls_age = (my_age/2)+7 return girls_age buckys_limit = allowed_dating_age(22) creppy_jow_limit = allowed_dating_age(49) print("Bucky can date girls", buckys_limit,"or older") print("Bucky can date girls", creppy_jow_limit,"or older") 이번 예제의 함수는 my_age라는 인수로 값을 받아서 내부연산을 한 후 결과값을 return으로 되돌려주..