¡GoConqr estrena diseño! Cuéntanos qué te parece.

Apuntes

Functions

asderel An Introduction to Interactive Programming in Python Español 1 página

Contenido del apunte (1)

Página 1

Functions — Functions

Functions are reusable pieces of programs that take an input and produce an output.

A function definition is a compound statement consisting of a header and a body.

The header includes the keyword def, a sequence of parameters enclosed by parentheses, followed by a colon :.

The body consists of a sequence of statements, all indented by 4 spaces.

Functions may return a value using the keyword return or have a side effect (e.g., print).

To evaluate a function call, replace the function's parameters in the body of the function by their associated values in the call and execute the body of the function.

Lecture examples - Functions

More examples - Stucture of Functions, Uses of Functions, Scope of Variables, Examples of Functions

Página Nueva

Información

Descripción
(Week 1 - Functions, logic, conditionals) An Introduction to Interactive Programming in Python Apunte sobre Functions, creado por asderel el 29/04/2013.
Creado por
asderel · abr 2013
Actualizado
15 sep 2016
Visitas
53
Valoración

Escríbenos

¿Sobre qué es tu mensaje?

¿Qué te parece el nuevo diseño?

¿Te gusta?