tag:blogger.com,1999:blog-18677687.post1400056975751105054..comments2022-11-18T04:21:25.296-05:00Comments on Computer Science Teacher: Assumptions, Misunderstandings, and Programming DecisionsAlfred Thompsonhttp://www.blogger.com/profile/05575057876858763822noreply@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