Skip to content · ⁨Saltar al contenido⁩

Call a function · ⁨Llamar a una función⁩

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.

Español

Llamar a una función

greet ya está escrita para ti. Llama a la función con "Mia" para que el programa imprima "Hello, Mia".

Escribir def solo describe la función — nada sucede hasta que la llamas por su nombre con corchetes: greet("Mia"). La llamada se coloca en el margen izquierdo, fuera del def.

Log in or create account · ⁨Iniciar sesión o crear cuenta⁩

IGCSE, A-Level & AP