use case • Run it (make sure it fails and fails miserably) • Write code and implement the required functionality with relevant level of detail • Run the test • Write test for addition features • Run all test • Watch it succeed. Have a cup of coffee !
• written minimal amount of application code – total application + tests is probably more – objects: simpler, stand-alone, minimal dependencies • tends to result in extensible architectures • instant feedback
==str or type(val2) == str: val1 = str(val1) val2 = str(val2) sum1 = sum([ord(i) for i in val1]) sum2 = sum([ord(i) for i in val2]) if sum1 > sum2: return True else: return False if val1>val2: return True else: return False