Coding is the ultimate computer game. It is you vs. the computer. You are trying to enslave it, to get it to do exactly what you want it to do. It resists in every way possible; it is worse than a teenager at finding tiny little minuscule things you didn’t get precisely right and using them to defeat you. Sometimes they hide what they did and it is your struggle to find it and correct it.
Then the ultimate joy: your program runs, and gives an answer that looks right (but it might not be exactly what you expected). You’ve won! You enslaved the computer, if only on this one task. You defeated it! Congratulations! Show your friends. Celebrate.
Coding is certainly hard. But it is never boring.
Time to move on to the next level, and to program something more challenging.