Mapa mental
python function
Contenido del mapa
python function
- def my_function(args): return args + ' world' my_phrase=my_function('hello') print( my_phrase )
define a function
- def my_function(args):
- a function has optional parameters
- in this simple function, we return args and 'world' concatenated
- return args+' world'
- >>>indent is important.
- store the results of a function
- my_phrase = my_function( 'hello' )
- my_phrase is now 'hello world'
- printing the results
- print( my_phrase )
- 'hello world'
- print( my_phrase )
- printing the results
- send arguments to the function
- my_phrase is now 'hello world'
- my_phrase = my_function( 'hello' )
- store the results of a function
- >>>indent is important.
- return args+' world'
- in this simple function, we return args and 'world' concatenated
- a function has optional parameters
- def my_function(args):
Información
- Descripción
- Python Mapa Mental sobre python function, creado por Jahangir Shah el 02/10/2017.
- Creado por
- Jahangir Shah
- Visitas
- 0
- Valoración