import math
investimento=float(input('Indique o Investimento Inicial:'))
retorno =float(input('Indique o Retorno do Investimento:'))
taxaatualização = float(input('Indique a Taxa de Juros '
'(em %):'))
anos = int(input('Indique o Tempo de Retorno:'))
taxajuro=taxaatualização/100
retornoa= retorno/pow((1+taxajuro),anos)
roi = ((retornoa - investimento)/investimento)*100
if roi==0:
print('O Retorno foi igual ao Valor do Investimento')
elif roi<0:
print('O Retorno sobre oInvestimento foi de {:.2f}%'
''.format(roi))
print('O Retorno foi inferior ao Valor do Investimento.'
'Foi um mau Investimento.')
else:
print('O Retorno sobre o Investimento foi de {:.2f}%'
''.format(roi))
Comentários
Enviar um comentário