tdd/lab-workbook.rst
author Madhusudan.C.S <madhusudancs@gmail.com>
Tue, 07 Sep 2010 12:09:06 +0530
changeset 126 b9c6563869ef
child 127 f65aec952da7
permissions -rw-r--r--
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.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
126
b9c6563869ef 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.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
     1
======================================
b9c6563869ef 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.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
     2
Lab Workbook - Test Driven Development
b9c6563869ef 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.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
     3
======================================
b9c6563869ef 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.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
     4
b9c6563869ef 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.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
     5
The notation that follows every question denotes the level on the
b9c6563869ef 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.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
     6
Revised Bloom's Taxonomy.
b9c6563869ef 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.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
     7
b9c6563869ef 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.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
     8
Lab - 1
b9c6563869ef 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.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
     9
=======
b9c6563869ef 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.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
    10
b9c6563869ef 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.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
    11
  1. Write a stub function for calculating the LCM of two numbers.
b9c6563869ef 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.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
    12
  2. Write the tests for the LCM function, place the tests in if
b9c6563869ef 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.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
    13
     __name__ == '__main__': part of the Python file. Demonstrate that
b9c6563869ef 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.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
    14
     the tests fail.
b9c6563869ef 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.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
    15
  3. Implement the code for the LCM function, using the gcd function
b9c6563869ef 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.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
    16
     provided in the examples in the chapter. Demonstrate the tests
b9c6563869ef 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.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
    17
     pass. (For the algorithm refer to Wikipedia - [0])
b9c6563869ef 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.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
    18
  4. Alternatively, build a set of test cases, preferably a large
b9c6563869ef 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.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
    19
     number of cases, place it in a text file and use these test cases
b9c6563869ef 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.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
    20
     to test your LCM function. Demonstrate that tests still continue
b9c6563869ef 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.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
    21
     to pass.
b9c6563869ef 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.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
    22
b9c6563869ef 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.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
    23
[0] - http://en.wikipedia.org/wiki/Least_common_multiple#Reduction_by_the_greatest_common_divisor
b9c6563869ef 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.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
    24
b9c6563869ef 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.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
    25
Lab - 2
b9c6563869ef 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.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
    26
=======
b9c6563869ef 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.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
    27
b9c6563869ef 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.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
    28
  1. 
b9c6563869ef 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.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
    29
b9c6563869ef 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.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
    30
b9c6563869ef 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.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
    31
Lab -3
b9c6563869ef 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.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
    32
======
b9c6563869ef 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.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
    33
b9c6563869ef 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.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
    34
  1.