## Python 3 code - Rounding integers

Question

I am trying to round numbers up in python 3. In my existing code, the number either round up to the nearest 10 or down. For example, 67 goes to 70 and 64 goes to 60. I would like the number to always round up to the nearest multiple of 10, so that `67-->70`

and `64-->70`

. Here is my code for rounding so far:

```
##ROUNDING SumOfUsrinput TO NEAREST 10##
SumOfUsrinput=int(input("Please enter the sum: "))
SumRounded=round(SumOfUsrinput,-1)
print (SumRounded)
```

I would appreciate it if you could answer simple and explain how it works.

Show source

## Answers to Python 3 code - Rounding integers ( 1 )

One way of rounding up would be to use integer division to go down to the precision you want and then multiplying back up. e.g.,: