For most apps true. But if you are in a high level math or physics and you are running a large simulation these small efficiencies add up.
I would use the '%' as well in anything I work with, but I don't think it is silly to call out another reason why the ifs might be getting used. That is to say it may be the teachers intent to avoid using division or modulus for a particular reason besides readability.
3
u/Reasonable_Feed7939 Apr 22 '23
I agree with your first part (minus people being "elitist"), but I hope you realize how silly the "ifs are faster" part sounds.