Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math
- print(round(1.33, 1))
- print(round(1.37, 1))
- print(round(-1.37, 1))
- print(round(math.pi, 3))
- print(format(math.pi, '0.2f'))
- print(format(math.pi, '0.3f'))
- print('El valor de {} redondeado a 3 decimales es {:0.3f}'.format(math.pi, math.pi))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement