Nope, Duolingo is not sensitive to punctuation. You can skip any commas, periods or question/exclamation marks you want in any language course (not only Ukr) and it will be accepted.
Probably you had a typo or some other mistake. It's usually displayed in the red text that pops up, pay attention to which words are underlined if any, and to the correct answer, compare it to yours.
A common mistake is to enter a Latin "i" instead of the Cyrillic "і" or "a" instead of "а". Unfortunately, they are not the same UTF characters and are not interchangeable.