1.3 Practice: defining algorithms