Faculty of Engineering and Mathematical Sciences 
Not logged in (login)

help4407


This forum is provided to promote discussion amongst students enrolled in Open Source Tools and Scripting (CITS4407).
 
Options:
RSS cloud
Jump to:

Assignment 1 Task 1

2 of 390 articles shown, currently no other people reading this forum.
photo
From: David M.
Date: Thu 2nd Apr 2020, 6:50pm
Actions: 
        Login-to-reply

 

The example output from the "between" program gives the difference between 2 April and 20 April as 19 days.  However, the stated convention is that consecutive days differ by 1. Therefore, I would expect the 2nd and 20th days of April to differ by 18 days.

Proof: Consecutive days differ by 1 day (given).
To compute days between the 2nd and 20th day of April add up the consecutive days.
2-3: 1 day, 3-4: 1 day, 4-5: 1 day, 5-6: 1 day, 6-7: 1 day, 7-8: 1 day, 8-9: 1 day,
9-10: 1 day, 10-11: 1 day, 11-12: 1 day, 12-13: 1 day, 13-14: 1 day, 14-15: 1 day,
15-16: 1 day, 16-17: 1 day, 17-18: 1 day, 18-19: 1 day, 19-20: 1 day.

Adding the consecutive days gives 18.

Assignment 1 Task 1

photo
From: Christopher M.
Date: Thu 2nd Apr 2020, 6:54pm
Actions: 
        Login-to-reply

 

"David May" <17*1*2*[email protected]*u*e*t*u*a*e*u*a*> wrote:

> The example output from the "between" program gives the difference between 2 April and 20 April as 19 days.  However, the stated convention is that consecutive days differ by 1. Therefore, I would expect the 2nd and 20th days of April to differ by 18 days.


Yes, 18. Corrected. Thanks David.


> Proof: Consecutive days differ by 1 day (given).

My proof: 20 - 2 = 18.
This Page


Program written by: [email protected]
Feedback welcome
Last modified: 11:27am Sep 21 2020