2
Can anyone tell me why in the first iteration the assignment retangulo=retangulo()
works, but on Monday?
This error appears in Pycharm:
<<'rectangle' Object is not callable>>
Code:
from MDvalidateDATA import validateDATA
class ponto:
def __init__(self,x=0,y=0):
self.x=x
self.y=y
class retangulo:
def __init__(self):
self.base=validateDATA("Digite a o valor da base(entre 1 1000): ",1000,1,"float")
self.altura = validateDATA("Digite a o valor da altura(entre 1 1000): ", 1000, 1, "float")
def centro(self,ponto):
ponto.x=self.base/2
ponto.y=self.altura/2
x="1"
while x=="1":
retangulo=retangulo()
ponto=ponto()
retangulo.centro(ponto)
print(ponto.x,ponto.y)
x=input("Digite 1 para continuar ou quaklquer outra tecla pra sair: ")
It worked, bro :) Thank you so much
– Rafael