I was doing an exercise of my python class and after seeing the results i was imagining what could i do to shorten the resultant variable (to avoid results like: 3.888888888, and transform it to 3.8 or 3.88. Someone could help me?! (Also the code is working very well i just wanna improve it)
OBS: My code is at my native language, so ill explain. The user type a number and it will show your double, triple, square root (b,c and d; respectively)
a = float(input("Digite um número para descobrir: \n\nSeu Dobro \nSeu Triplo \nSua Raiz Quadrada \n\nDigite um número: "))
b = a * 2
c = a * 3
import math
d = math.sqrt(a)
print()
print("RESULTADOS: \n\nDobro: {} \nTriplo: {} \nRaiz Quadrada: {} \n".format(b, c, d))