• 17 Posts
  • 694 Comments
Joined 1 year ago
cake
Cake day: June 22nd, 2024

help-circle



  • school exercises are written the way they are, so a teacher can explain concepts without pupils stumbling over implicit stuff they could not know about, and not to be concise.

    that’s why they give a stepsize to range even if its the default and explaining if is easier if you have a full expression instead of just something that might be true or false.

    the else is there because this way a pupil can parse the program as ‘if the door is closed open it and enter, otherwise just enter’ which is the intent of the code even if you get rid of the else and the extra move()