# HG changeset patch # User Madhusudan.C.S # Date 1283841546 -19800 # Node ID b9c6563869effdf2e8201ee9e33195c0e18e320d # Parent 343a405d0aca8ec6d2eef6af43f07d61b23785a3 First Lab exercise questions. Sorry for very small commits. I paid the penalty of losing my entire file on which I had worked on 1 and half days. diff -r 343a405d0aca -r b9c6563869ef tdd/lab-workbook.rst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tdd/lab-workbook.rst Tue Sep 07 12:09:06 2010 +0530 @@ -0,0 +1,34 @@ +====================================== +Lab Workbook - Test Driven Development +====================================== + +The notation that follows every question denotes the level on the +Revised Bloom's Taxonomy. + +Lab - 1 +======= + + 1. Write a stub function for calculating the LCM of two numbers. + 2. Write the tests for the LCM function, place the tests in if + __name__ == '__main__': part of the Python file. Demonstrate that + the tests fail. + 3. Implement the code for the LCM function, using the gcd function + provided in the examples in the chapter. Demonstrate the tests + pass. (For the algorithm refer to Wikipedia - [0]) + 4. Alternatively, build a set of test cases, preferably a large + number of cases, place it in a text file and use these test cases + to test your LCM function. Demonstrate that tests still continue + to pass. + +[0] - http://en.wikipedia.org/wiki/Least_common_multiple#Reduction_by_the_greatest_common_divisor + +Lab - 2 +======= + + 1. + + +Lab -3 +====== + + 1.