Yes, you should put a comma.
A comma is usually used in the middle of a sentence to separate two clauses, or right before a conjunction. Since “like” is a dependent clause in this sentence, as “it can be attractive” can stand alone, a comma would be put before it. It may also help to read the sentence and see if there is a natural pause to it.
1. Despite what is depicted in popular culture, Frankenstein is the name of the creature's creator.
2. The Italian physician Luigi Galvani demonstrated that nerve impulses have an electrical basis. He is also widely known as the father of bioelectromagnetics.
3. The stranger ask Robert Walton where the ship is headed before boarding the ship.
Y = 15(3) - 40
If this is finding a function-