About 309,000 results
Open links in new tab
  1. python - How do you round UP a number? - Stack Overflow

    May 5, 2017 · How does one round a number UP in Python? I tried round (number) but it rounds the number down. Here is an example: round (2.3) = 2.0 and not 3, as I would like. Then I tried …

  2. Round up to second decimal place in Python - Stack Overflow

    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 …

  3. math - Python round up integer to next hundred - Stack Overflow

    Jan 14, 2012 · How do I round up an integer, for example: 130 -> 200? In case it's not clear, I don't want 100 to round up to 200.

  4. How to properly round-up half float numbers? - Stack Overflow

    @simomo Python's round() function used to round up in older versions, but they switched the rounding strategy to half to even in Python 3. It was a deliberate choice because this produces …

  5. python - How to round a floating point number up to a certain …

    Jan 22, 2015 · Here, num is the decimal number. x is the decimal up to where you want to round a floating number. The advantage over other implementation is that it can fill zeros at the right …

  6. python - How to round up a value with any decimal - Stack Overflow

    Jun 5, 2014 · I want to make the value always round up no matter what it is, so example: Strength = 16.33333 What would I use on that to make it (No matter what it equals) round up to the next …

  7. Why does Python 3 round half to even? - Stack Overflow

    Python 3's way (called "round half to even" or "banker's rounding") is considered the standard rounding method these days, though some language implementations aren't on the bus yet.

  8. Rounding decimals with new Python format function

    Oct 21, 2009 · How do I round a decimal to a particular number of decimal places using the Python 3.0 format function?

  9. python - How to round float 0.5 up to 1.0, while still rounding 0.45 …

    May 8, 2017 · It appears that the default Python round (1 / 2) gives 0. How to round float 0.5 up to 1.0, while still rounding 0.45 to 0.0, as the usual school rounding?

  10. python - Round number to nearest integer - Stack Overflow

    round(value,significantDigit) is the ordinary solution, however this does not operate as one would expect from a math perspective when round values ending in 5. If the 5 is in the digit just after …