+ 1

Hey can anyone tell me this??

I want to round off the equation to next number, how would I do it. For e.g: a = (40+10/100*56) print(a) if I put int at front it makes, 5.6 as 5 and with float it gives answer in decimal but I want : (40 + 10/100*56) = 46, not 45.6, not 45.

23rd May 2020, 2:24 PM
Tejas Joshi
Tejas Joshi - avatar
5 Answers
+ 1
import math x = 4.62 print(math.ceil(x)) 5 Rounds x UP to the nearest number.
23rd May 2020, 2:29 PM
Slick
Slick - avatar
+ 1
(=_=)(=_=)(=_=)(=_=)(=_=)
23rd May 2020, 2:26 PM
𝖆𝖊𝖙𝖍𝖊𝖗
𝖆𝖊𝖙𝖍𝖊𝖗 - avatar
+ 1
You should try by increasing some values or by importing some math module for roundoff
23rd May 2020, 2:33 PM
𝖆𝖊𝖙𝖍𝖊𝖗
𝖆𝖊𝖙𝖍𝖊𝖗 - avatar
+ 1
Slick thanks bro it works 👍🏻
23rd May 2020, 2:37 PM
Tejas Joshi
Tejas Joshi - avatar
0
Vinayak Is it possible bro??
23rd May 2020, 2:27 PM
Tejas Joshi
Tejas Joshi - avatar