Should there be two spaces or one after a period? How about with a hyphen? That is the challenge when dealing with certain punctuation rules, and sometimes it is never quite clear which ones are to be followed and when. Ultimately, it depends on the software and how you set your preferences, and the format your teacher has set forth as well.
Typerwriters and the Two-Space Rule for Periods, Exclamation Points and Question Marks
Before computers became a household feature, many students slaved away on devices called typewriters. These manual machines required certain formats for spacing, because each character took up the same amount of space. That is why when researching punctuation rules, you may find two spaces prescribed after a period, as well as any other end-of-sentence punctuation -- in order to increase readability.
New Rules for Periods, Exclamation Points and Question Marks
Now with computers, fonts use proportional spacing, and the two extra spaces are no longer needed. That is why one space after end punctuation is recommended by various style manuals, including APA (American Psychological Association), MLA (Modern Language Association) and "Chicago Manual of Style." Two spaces can still be used if desired, or if dictated by an instructor.
Hyphens, Slashes and Parentheses
Hyphens (-) connecting two words do not have spaces before or after, for example, "in-between," when used as an adjective before a noun. For an open parenthesis, one space goes before it, but none after. For a closed parenthesis, the opposite applies: no space before, one space after.
Some special characters do not require a space between them and the word that follows, while others do. For example, a number sign (#) and a dollar sign ($) are not followed by a space, whereas an "at" symbol (@) does require one before and after. The only exception is when using the @ symbol in an email address.