Today I have a question for you about rounding up numbers using conditions in Python.
I am doing a sales website and my client wants to round up the prices depending of the result converting them from USD to Colombian Pesos. For example: 200 USD to COP results in 353990 COP, and it should be rounded to 359000.
He have implemented a function that is doing the trick in Excel:
=IF(F4>=10000000,(ROUNDUP(F4,-6)-100000),IF(F4>=1000000,(ROUNDUP(F4,-5)-10000),IF(F4>=100000,(ROUNDUP(F4,-4)-1000),IF(F4>=10000,(ROUNDUP(F4,-3)-1000),IF(F4>=0,(ROUNDUP(F4,-3)))))))
I need to do exact the same thing but in Python, and I don't know the way to do it.
Thanks for helping me!