equal
deleted
inserted
replaced
23 [0] - http://en.wikipedia.org/wiki/Least_common_multiple#Reduction_by_the_greatest_common_divisor |
23 [0] - http://en.wikipedia.org/wiki/Least_common_multiple#Reduction_by_the_greatest_common_divisor |
24 |
24 |
25 Lab - 2 |
25 Lab - 2 |
26 ======= |
26 ======= |
27 |
27 |
28 1. |
28 1. Write the stub function, followed by the tests(demonstrating the |
|
29 failed tests), in turn followed by the code(demonstrating the |
|
30 passing tests) to calculate the number of days between two |
|
31 dates. Name your function num_of_days(). The function should take |
|
32 two arguments, both being tuples. Each tuple represents the date |
|
33 in the format of (dd, mm, yyyy) where dd, mm and yyyy are |
|
34 integers. |
|
35 2. Rewrite the num_of_days() function to take the start date as an |
|
36 optional argument. If the start date is not specified calculate |
|
37 the number of days between the only specified date since Unix |
|
38 epoch. Prior to manipulating the code to do this, make sure you |
|
39 change the tests, make them fail and then refactor the code. |
29 |
40 |
30 |
41 |
31 Lab -3 |
42 Lab -3 |
32 ====== |
43 ====== |
33 |
44 |