title: Python conditionally round up numbers
body: <p>Today I have a question for you about rounding up numbers using conditions in Python.</p>
  
  <p>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.</p>
  
  <p>He have implemented a function that is doing the trick in Excel:</p>
  
  <blockquote>
    <p>=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)))))))</p>
  </blockquote>
  
  <p>I need to do exact the same thing but in Python, and I don't know the way to do it.</p>
  
  <p>Thanks for helping me!</p>