Questions & Answers about Kokoš je u kokošinjcu, a pijetao je vani.
In this sentence, a links two clauses but also sets up a contrast:
- Kokoš je u kokošinjcu = the hen is in the henhouse
- a pijetao je vani = while/but the rooster is outside
So a often means something like:
- and, when comparing two things
- while
- whereas
- sometimes but, if there is a mild contrast
If you used i, it would sound more like simple addition: and. Here, a is better because the two animals are in different places.
Because Croatian normally uses the verb biti = to be in each clause:
- Kokoš je u kokošinjcu
- pijetao je vani
English can sometimes avoid repeating is, but Croatian usually keeps it. Repeating je makes the structure clear and natural.
You may sometimes hear shortened or more elliptical speech, but for a learner, repeating je in both parts is the safest and most standard pattern.