Python 3 not returning float

-1

I started to study python 3 and was doing some exercises, until I came across something unexpected, I can not get a float in response. I followed everything that was in the exercise and I still get an integer.

    
asked by anonymous 17.04.2018 / 22:08

2 answers

2

I noticed that you put "%i" on lines 12 and 16, this is not to show value integer type.

    
17.04.2018 / 22:11
1

On the lines where the 'prints' result is just change the encoding to:

 print("Media %f"%media)

This formatting will allow you to display the content in Float

in this link you can check out other functions that are used in the same way!

    
17.04.2018 / 22:22