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

Call a function · ⁨קרא לפונקציה⁩

English

Call a function

greet is already written for you. Call it with "Mia" so the program prints "Hello, Mia".

Writing def only describes the function — nothing happens until you call it by name with brackets: greet("Mia"). The call goes at the left margin, outside the def.

עברית

קרא פונקציה

greet כבר נכתבה בשבילך. קרא אותה עם "Mia" כך שהתוכנית תדפיס "Hello, Mia".

כתיבת def רק מתארת את הפונקציה — לא קורה שום דבר עד שתקרא אותה על ידי שמה עם סוגריים: greet("Mia"). הקריאה נמצאת בשוליה השמאלי, מחוץ ל-def.

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

IGCSE, A-Level & AP