[Python] Round up to Second Decimal Place in Python

Discussão em 'Python' iniciado por Stack, Novembro 27, 2024.

  1. Stack

    Stack Membro Participativo

    How can I round up a number to the second decimal place in python? For example:

    0.022499999999999999


    Should round up to 0.03

    0.1111111111111000


    Should round up to 0.12

    If there is any value in the third decimal place, I want it to always round up leaving me 2 values behind the decimal point.

    Continue reading...

Compartilhe esta Página