No .. it is not a homeworkIs this a homework question?
If it is, then you need to start by explaining how you think the circuits work. (a moderator will also move the thread to homework help)
Is the second "Constant" current or current "Limited" ?The second circuit is constant-current.
The first is not.
If you want to limit the current through the diode to a specific value than you would use the second circuit.
There is no particular difference between a constant-current and a current-limit function.Is the second "Constant" current or current "Limited" ?