Skip to content · ⁨דלג לתוכן⁩

Your first function · ⁨הפונקציה הראשונה שלך⁩

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.

עברית

הפונקציה הראשונה שלך

עד כה הדפסת דברים. פונקציה היא מכונה קטנה: נותנים לה קלט והיא מחזירה תשובה. אתה כותב את הפנימי; הבוודא מנסה אותה עם כמה קלטים.

return מחזיר את התשובה. השלם את double כך שתחזיר n כפול שתיים.

Log in or create account · ⁨היכנס או צור חשבון⁩

IGCSE, A-Level & AP