1
# coding: utf-8
peso = float(input('Qual o seu peso? (quilos)' ))
altura = float(input('Qual o seu tamanho? (metros)'))
imc = peso/altura**2
print('seu IMC é de', imc)
What is your weight? (kilos) 49.00
How big is it? (meters) 1.62
('its IMC xc3 xa9 de', 18.670934308794386)
- Why these \xc3 xa9 are appearing in my reply?
- How to reduce the decimal places of the
float
?
What version of Python are you using? How is the code running?
– Woss
See if your file is saved with the utf8 encoding, it is common the file is not in utf8 and there are such bugs, try to open the file by sublime and click "File > Save with encoding > UTF-8".
– Victor Fernandes
To reduce the number of decimals, use round(imc,2) to two decimal places.
– de_python