Junction diodes are constructed from a single crystal of semiconductor material that has been altered to form a PN junction.
Semiconductors fall somewhere between the conductors (metallic elements) and non conductors (non metallic elements). Generally speaking pure (intrinsic) semiconductor is an element with 4 electrons in its outer shell and is pretty useless electrically. It is neither a good conductor or a good insulator. The first semiconductors used Germanium. Devices today use Silicon.
The reason semiconductor materials are useful is that we can easily alter their electrical properties (especially conductivity) by adding or DOPING them with (very) small amounts of other elements. These doping atoms fit into the crystal lattice but their different electron structure alters the way electrical current can flow through the material.
Making P type and N type semiconductors.
N type has lots of 'extra' electrons because the dopant had 5 electrons in its outer shell - 1 more than (intrinsic) semiconductor.
Similarly P Type has gaps or HOLES in the outer electron shells because the dopant only as 3 electrons compared to 4 of the (intrinsic) semiconductor.
When the PN junction is made the material in the 'middle' is neither P or N type as all the free charge carriers are swept to one side or the other. This is known as the DEPLETION layer. (a bit like no-man's land between two opposing armies)
This depletion layer is the source of the voltage drop across the diode.
To get current (flow of charge) through the diode the charge has to 'jump over' this barrier (its more technical than that but let's keep it simple). It needs an extra bit of energy to do this.
Now energy is charge x voltage. The value of the charge is fixed - its simply the electronic charge - 1.602 X 10^-19 so the only charges that can cross the barrier must have have energies of more than the barrier. As the charge is fixed and unchangeable we simply talk about the barrier voltage. For Silicon this is about 0.6 volts. For Germanium this is about 0.2 volts.
The barrier acts like a small battery of 0.6V connected in the OPPOSITE direction to the current flow. (Conventional current - positive to negative). You can only measure this when current is flowing through the diode.
Photodiodes can generate actual voltage but that's another matter.
This means that for every diode in the circuit we will lose 0.6V when they are conducting (forward biased). (This increases slightly with current value)
In a series circuit with resistors it does not really matter if the resistor comes before or after the diode. The current passing through resistor and diode is the same. The total voltage drop across the resistor and diode will be the same.
The LIGHT EMITTING DIODE has a much larger voltage drop (about 1.5V - 3.0 V) than a 'normal' diode. It uses this extra energy to output light.
You can't use Ohm's law to calculate the current through a diode.
However, the resistor is in series with the diode and, as you've learned, series connected circuit elements have identical currents.
Thus, you can use Ohm's Law to find the current through the resistor and diode but, to do that, you need the voltage across the resistor.
When you subtract the diode voltage from the source voltage, by KVL, what remains is the voltage across the resistor \$V_R\$.
Now, if you know the desired current, e.g., \$20mA\$, you can calculate the resistance required for that series current.
Thus, by Ohm's Law, the desired resistor value is:
$$R = \dfrac{V_R}{20mA} = \dfrac{V_S - V_D}{20mA} = \dfrac{9V - 1.7V}{20mA}$$
Best Answer
I don't have that book to confirm, but look at the book's errata page on the publisher's website here (scroll about halfway down the page and click the "Errata" tab):
Wiley - Complete Electronics Self-Teaching Guide with Projects
You can see that a change was made to the question which did originally mention 1 ampere:
So you can see that they changed the question. However it appears that in your edition (and perhaps in all editions, since the answer isn't mentioned in the errata) they forgot to change the answer!
Based on the new details in the question, your answer is indeed correct. Of course you should read the rest of the errata on that Wiley webpage, in case any of them also apply to your edition.
You might also want to read the comments on some parts of that book, in the "Spot The Mistakes" section, about one-third of the way down this page (search for the author's name Boysen):
http://www.talkingelectronics.com/projects/SpotMistakes/SpotMistakesP18.html
It seems to refer to an earlier edition of the book, since it shows the original "1 ampere" current in the question. However some of the other concerns mentioned there might also apply to your edition.