-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathmain.py
More file actions
36 lines (31 loc) · 808 Bytes
/
main.py
File metadata and controls
36 lines (31 loc) · 808 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
def suma(x, y):
"""
Funcion que toma 2 argumentos y devuelve la suma de los mismos
Args:
x (int/float): Primer valor a sumar
y (int/float): Segundo valor a sumar
return: x+y
"""
return x + y
def escribir(fpath, data_in):
"""
Funcion que escribe en un archivo
Args:
fpath: path absoluto del archivo
data_in: información a escribir
"""
with open(fpath, "w") as file_in:
file_in.write(data_in)
class calculadora:
"""
Clase calculadora
"""
def sumar(x, y):
"""
Funcion que toma 2 argumentos y devuelve suma
Args:
x (int/float): Primer valor a sumar
y (int/float): Segundo valor a sumar
return: suma(x,y)
"""
return suma(x, y)