There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Campbell Ritchie wrote:Remember there are exercises in books and exam websites where they intentionally indent the code incorrectly. A lot of people think the indentation is significant to the syntax, and misinterpret the code. Which is exactly what the people writing the exercise hoped for
Dylan Cassidy wrote:Is there any way to shorten up that 'if' statement, it seems a bit long winded....
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Dylan Cassidy wrote:I followed your advice
Joanne
Thank you for noticing, Joanne. It looks even worse now I have added code tags and the inconsistent indentation reappears.Joanne Neal wrote:
Dylan Cassidy wrote:I followed your advice
You didn't follow the advice in the first sentence (other than the welcome) of Campbell's post.
Campbell Ritchie wrote:I have added code tags and the inconsistent indentation reappears.
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |