-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunciones.py
More file actions
54 lines (36 loc) · 962 Bytes
/
funciones.py
File metadata and controls
54 lines (36 loc) · 962 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/usr/bin/python
# -*- coding: utf-8 -*-
separador = "------------------------------------"
def mi_funcion():
print("Baia baia")
mi_funcion()
########################################
print(separador)
# Parámetro y parámetro con un valor por default
def sumando(num1,num2):
suma = num1 + num2
print(str(suma))
sumando(3,5)
#############################################
print(separador)
def funcion_return():
palabra = "HOLA, ESTO RETORNÓ"
return palabra
frase = funcion_return()
print(frase)
####################################################
print(separador)
def multiplicacion(num1,num2):
multi = num1 * num2
return multi
multiplicar = multiplicacion(2,2)
print(multiplicar)
##################################################
print(separador)
def funcion_numeros(num1):
if num1 == 2:
return "Tu número es 2"
else:
return "Tu número no es 2"
numero = funcion_numeros(1)
print(numero)