Thursday, June 22, 2017

[Update] Programming Challenge 12.2

Without being aware of it, the code written for Programming Challenge 12.2 already contained, what was asked for in 12.5: It displayed the line numbers next to whatever text a file contains. That being the case I had to make a decision:

1.) I post a link and explain that, instead of actual code, this is the link to Programming Challenge 12.2 and here is why.
2.) I alter the Programming Challenge 12.2, remove the line that displays the line numbers, take screenshots, update the code, and explain the reason for doing so.

Although I hate to alter code once it is published, it was a good decision this time around. The reason being that there are two example files attached to both Programming Challenges. One contains a long one a short text. In case of the latter it is indeed shorter, yet still contains more than 24 lines of text. I don't even know why, upon testing my program, this went unnoticed. It makes absolutely no sense at all! I can only guess that, originally, it should contain less than 24 lines, to demonstrate that "Press Enter to continue" would not be triggered upon executing the program. Whatever the reason, an updated version of short.txt is online, which now contains less than 24 lines.

Now it is back to my IDE. I wish my visitors, occasional and regular, as well as my fellow learners, to you manage to be productive today, and you, unlike I, don't have to suffer to much under the remorseless heat of summer.

No comments:

Post a Comment