Your first function · 처음 작성하는 함수
This page needs a recent browser (with SharedArrayBuffer support). Please update Chrome, Edge, Firefox or Safari to the latest version. · 이 페이지는 최신 브라우저(SharedArrayBuffer 지원)가 필요합니다. Chrome, Edge, Firefox 또는 Safari를 최신 버전으로 업데이트해 주세요.
This one builds on a lesson you haven't finished yet. Do that lesson first: · 이 과제는 아직 완료하지 않은 수업에 기반합니다. 먼저 해당 수업을 완료하세요:
Python Basics · Functions →
English
Your first function
Up to now you printed things. A function is a small machine: you give it an input and it returns an answer. You write the inside; the checker tries it with several inputs.
return hands the answer back. Complete double so it returns n times two.
한국어
당신의 첫 번째 함수(your first function)
지금까지输出的 것은 모두 출력하는 것이었습니다. **함수(function)**는 작은 기계와 같습니다: 입력값을 주면 **반환(return)**하여 결과를 줍니다. 함수 안쪽의 내용을 작성하고, 채점기가 여러 입력값으로 테스트합니다.
return가 결과를 반환합니다. double을 완성하여 n를 두 배로 계산해 반환하게 하세요.
Write a function. Complete double(n) so it returns n times two. · 함수를 작성하십시오. double(n)를 완성하여 n의 두 배를 반환하도록 하십시오.
Click Run to see the output here. · 출력을 보려면 '실행'을 클릭하세요.