#Mastery05

Basic Output

In this Mastery I´m going to show you how to only show a certain number of decimals of a float number.

Basically all you have to do is write this «formula»:

print (f «Whatever you want to say {variable:#f}»)

The «f» is to cut decimals of your float number and «#» is the number of decimals that you want to show.

Here is an example with pi:

Here is another example:

Deja un comentario

Diseña un sitio como este con WordPress.com
Comenzar