DEV Community

Programming and Bloom's Taxonomy

Michael Taggart on December 07, 2017

Originally appeared on my blog You can't get near education theory in the 21st century without Benjamin Bloom's categorization of cognitive activi...
Collapse
 
courier10pt profile image
Bob van Hoove

def isEven(n): return n % 2 == 0;

Collapse
 
mttaggart profile image
Michael Taggart

Totally right! This is where writing teaching code rather than maximally elegant code sometimes produces different results.

Collapse
 
courier10pt profile image
Bob van Hoove

Sorry I should have explained why I posted that.

If you have a piece of code of the form:

if (condition):
    return True
else:
    return False

Be aware that condition is a Boolean already, by virtue of fitting in the if statement. It's not elegance I wanted to demonstrate, I just wanted to raise type awareness.

I'll be keen to write a little explanation if I'm ever tempted to reply with a line of code like this :)

Collapse
 
courier10pt profile image
Bob van Hoove

I saw you updated the article. You're swift with feedback, kudos :)