Posts by Uga Buga • 33 points
1 post
-
3
votes2
answers85
viewsQ: Formatting to number of decimals dynamically using Python
import math def formating_pi(n): a= "pi com {:c} casas decimais é {:.17}" return a.format(n, math.pi) formating_pi(5) I’d like to not put the number 17 explicitly, but rather the result of the…