Advertisement
Fhernd

formato.py

Jan 17th, 2018
882
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.23 KB | None | 0 0
  1. numero_decimal = 2.7172
  2.  
  3. # Formato estándar:
  4. print(format(numero_decimal))
  5.  
  6. # Formato con signo positivo y dos signos de precisión:
  7. print(format(numero_decimal, '+.2f'))
  8.  
  9. # Formato porcentual:
  10. print(format(0.191713, '.2%'))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement