tag:blogger.com,1999:blog-18677687.post1400056975751105054..comments2018-08-17T08:41:52.587-04:00Comments on Computer Science Teacher: Assumptions, Misunderstandings, and Programming DecisionsAlfred Thompsonhttps://plus.google.com/116648179447008949472noreply@blogger.comBlogger1125tag:blogger.com,1999:blog-18677687.post-43144509667277847322018-05-28T18:31:50.780-04:002018-05-28T18:31:50.780-04:00Classic mathematical compound inequality:
i >= ...Classic mathematical compound inequality:<br />i >= 0 AND i <= 10<br />can be mathematically written as <br />0 <= i <= 10<br />but there is no equivalent in many computer languages.<br /><br />I would start with not having both limits not depend on the came variable:<br />num_oranges >= 0 AND num_apples <= 10<br />Pretty much have to write the code (and the math) very close to the above line.<br /><br />There is nothing different if both limits are the same variable.<br />Unknownhttps://www.blogger.com/profile/18396878111978934581noreply@blogger.com