• 0 Posts
  • 7 Comments
Joined 1 year ago
cake
Cake day: June 9th, 2023

help-circle
  • I want to add that you should consider that your teacher is teaching you fundamentals of programming. break and continue are often options to use, but you shouldn’t try to solve everything with them. You are probably writing pretty basic functions in class right now where it doesn’t really matter, but with more complex problems break and continue constructions might easily get pretty messy.

    Also your teacher has a plan what to teach you over the whole semester. If recursion is part of this plan it’s valid she wants you to understand the basics of calling functions first. This might be overkill for easy problems but it could help you to be a better programmer in the future.