这是我的代码:
from math import ceil
a = 25
a = float(a/10)
a = int(ceil(a))*10
print a
Run Code Online (Sandbox Code Playgroud)
我得到20,但我想要30,
接下来是我想要的:
if the a is 22 , i want get 20
if the a is 25 , i want get 30
if the a is 27 , i want get 30
if the a is 21 , i want get 20
Run Code Online (Sandbox Code Playgroud)
那我该怎么办
谢谢