A Algorithm Example Code Python Hay