Good afternoon. I would like to know how to declare and use methods within the same class. For example, in a class there are 2 methods, which 1 method uses the other.
For example:
class ClasseEMetodo:
def retorna_valor:
return '10'
def imprimi_valor:
print('O valor é {0}' retorna_valor())
# chamada
var = ClasseEMetodo
var.imprimi_valor()
The error shown is:
def retorna_valor:
^
SyntaxError: invalid syntax