How To Write An Algorithm In Python