Hello everyone, how are you?
I'm doing an activity for my python course, it's a script that basically calculates the area of a wall in meters and tells how many gallons will be used for paint. The problem is that when I type a very high value of height and width, type, 543.404 x 456.435 the script returns me the following result area 2.3e + 05, I wanted all results to come with floating points and only two houses after the comma, follow my code. Note: in my program 1 liter of paint paints 2m2 of area, so the variable t = 2.
Obs2: Someone helps me to post the code correctly here on the site.
print('Bem vindo ao programa de orçamento\nde tintas: ')
l = float(input('Digite a largura da parede em metros: '))
print('Muito bem!')
a = float(input('Agora digite a altura da parede: '))
m = (l * a)
print ('Certo! Você tem uma área de: {:.2} metros' .format (l * a))
t = 2
print ('Para pintar esta parede, você vai\nprecisar de: {:.2} litros de tinta!'.format(m / t))