Creating Snake in Python and Ruby