Posts by Cleudeir Vieira • 11 points
1 post
-
1
votes5
answers140931
viewsA: How to limit decimal numbers in Python?
To make truncation a simple way: n1= 1.9999999999999 t =3 # Numero de casas d = int(n1 * 10**t)/10**t print('Truncado', d) print('Arredondado', round(n1,t))…