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).

A reminder that there will be no Zoom laboratory session on Friday 29th.
 
Assignment 2 and Clarifications.
 
Options:
RSS cloud
Jump to:

Assignment 1 Task 1

1 of 339 articles shown, currently no other people reading this forum.
photo
From: David M.
Date: Thu 2nd Apr, 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.

Related articles

Assignment 1 Task 1 (both) RSS
├─ THIS   Thu 2nd Apr, 6:50pm, David M.
└─ reply 1   Thu 2nd Apr, 6:54pm, Christopher M.
This Page


Program written by: [email protected]
Feedback welcome
Last modified:  8:27am May 24 2020