In the past, assignments in introductory programming courses were like this exercise (see image).
You had to start from scratch and design the algorithm yourself using pen and paper. It required a lot of effort, but in the end, you learned something valuable from the experience—something AI doesn't provide these days.