Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Calculadora:
- def __init__(self, a, b):
- self.a = a
- self.b = b
- def soma(self):
- return self.a + self.b
- def multiplica(self):
- return self.a * self.b
- def divide(self):
- return self.a / self.b
- def reducao(self):
- return self.a % self.b
- def tamanho(c):
- c = bin(c)[2:]
- print(c)
- return len(c)
- a = Calculadora(128, 2)
- print(Calculadora)
- d = int(input("numero"))
- b = tamanho(d)
- print(b)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement