summaryrefslogtreecommitdiff
path: root/tdd/lab-workbook.rst
diff options
context:
space:
mode:
authorMadhusudan.C.S2010-09-07 14:29:48 +0530
committerMadhusudan.C.S2010-09-07 14:29:48 +0530
commitbd3583e0aee0d6c0d1e495bce8fd847d20966096 (patch)
tree2ff22e7b9cb83ba97989c6bdc258fc11910a62fd /tdd/lab-workbook.rst
parentb5421c9914b4615cf6a615396efb6b8ce6d6309e (diff)
downloadsees-bd3583e0aee0d6c0d1e495bce8fd847d20966096.tar.gz
sees-bd3583e0aee0d6c0d1e495bce8fd847d20966096.tar.bz2
sees-bd3583e0aee0d6c0d1e495bce8fd847d20966096.zip
Add second lab exercise questions.
Diffstat (limited to 'tdd/lab-workbook.rst')
-rw-r--r--tdd/lab-workbook.rst13
1 files changed, 12 insertions, 1 deletions
diff --git a/tdd/lab-workbook.rst b/tdd/lab-workbook.rst
index 949f131..8bf1f79 100644
--- a/tdd/lab-workbook.rst
+++ b/tdd/lab-workbook.rst
@@ -25,7 +25,18 @@ Lab - 1
Lab - 2
=======
- 1.
+ 1. Write the stub function, followed by the tests(demonstrating the
+ failed tests), in turn followed by the code(demonstrating the
+ passing tests) to calculate the number of days between two
+ dates. Name your function num_of_days(). The function should take
+ two arguments, both being tuples. Each tuple represents the date
+ in the format of (dd, mm, yyyy) where dd, mm and yyyy are
+ integers.
+ 2. Rewrite the num_of_days() function to take the start date as an
+ optional argument. If the start date is not specified calculate
+ the number of days between the only specified date since Unix
+ epoch. Prior to manipulating the code to do this, make sure you
+ change the tests, make them fail and then refactor the code.
Lab -3