-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLab15 ejercicio-1_12.py
More file actions
32 lines (31 loc) · 918 Bytes
/
Lab15 ejercicio-1_12.py
File metadata and controls
32 lines (31 loc) · 918 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
azul_claro_blanco,purpura_blanco,azul_oscuro_blanco,cursiva=\
"\033[1;97;44m","\033[1;97;45m","\033[1;97;46m","\033[3;1;30m"
cielo,rojo,rosado,azul,verde,cyan,fin=\
"\033[1;36m","\033[1;91m","\033[1;95m","\033[1;94m","\033[1;92m","\033[1;96m","\033[0m"
print(cielo+"LABORATORIO 15 - EJERCICIO 1.12"+fin)
class Aritmetica:
def __init__(self,aa,bb):
self.a=aa
self.b=bb
def suma(self):
s=self.a+self.b
return s
def resta(self):
r=self.a-self.b
return r
def producto(self):
p=self.a*self.b
return p
def cociente(self):
c=self.a/self.b
return c
def residuo(self):
rd=self.a%self.b
return rd
def potencia(self):
pt=self.a**self.b
return pt
edades=Aritmetica(24,19)
print(verde+"PRODUCTO:"+fin,edades.producto())
print(verde+"COCIENTE:"+fin,edades.cociente())
print(verde+"RESIDUO:"+fin,edades.residuo())