Where should I put the punctuation?

General Tech Learning Aids/Tools 2 years ago

0 2 0 0 0 tuteeHUB earn credit +10 pts

5 Star Rating 1 Rating

Posted on 16 Aug 2022, this text provides information on Learning Aids/Tools related to General Tech. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.

Take Quiz To Earn Credits!

Turn Your Knowledge into Earnings.

tuteehub_quiz

Answers (2)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 2 years ago

In a few programming tutorials I am writing, I use quotations to indicate what the program should display if the output is short; such as:

The program should output "Hello World"

However, it irks me to have the sentence without any punctuation. Most websites that focus on essay writing state that the punctuation should go inside the quotation marks; but to me that implies that the punctuation is part of the output.

Should I write the sentence like this:

The program should output "Hello World".

Or should I use some other convention to indicate output when I type it inline with the text?

profilepic.png
manpreet 2 years ago

Neither. In this case, we are talking about programming, and "strings". It should be specific. If we aren't putting in a "." then we shouldn't say we are going to see one, even if it's grammatically correct.

When learning how to program, it is incredibly import to convey how sensitive the syntax is. Evey period (.) comma (,) semicolon (;) etc must be used with care. This is one of the common mistakes beginners make when learning how to write code. Forgetting to use a period in the middle of the syntax, or putting one where one doesn't belong can throw off the entire intended operation. So, to aid the experience of someone who is trying to learn such a specific skill, all of the documentation should he as clearly written as possible.

While adding the period to the end is grammatically correct according to the Yahoo Manual of Style as stated in another answer, why take the chance of introducing confusion if we are trying to drive home the point of how important periods are in a programming syntax? The simplest and most straightforward approach should be favored here, after all we are trying to help someone through a difficult and mentally exhaustive process. The easier it goes, the better.

To take that even one step further, you should remove even the quotes around "Hello World" and use italics, bolding, or color to emphasize the output.

I would also restructure the sentence so that the "Hello World" is not at the end. For example:

You should see Hello World on the screen.

This way you avoid the situation entirely.


0 views   0 shares

No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.