Is it plagiarism to use an online tutorial as the basis for completing a programming assignment?
Using online material to learn is not plagiarism.

This is a great way to learn (e.g, worked examples and subgoal labeling) and is a common way for instructors to try to teach something. Am I plagiarizing every time I use a common design pattern? No.

However, copying and pasting code from online is. It gets a little fuzzy when working on simple assignments that can be found easily online because it could be weakly argued that you are recalling it from memory. I would definitely not be concerned about this, especially if you think you understand the code and were not trying to cheat.

If you're genuinely concerned, you could even discuss it with your instructor and they might realize that they are not spending enough time discussing a certain process or giving you enough practice material.

EDIT: Based on your clarification in the comments, if this is something more specific/arcane and not a tutorial on something general, then just cite it. I have done this in my programming courses before. I added a comment at the top of my code linking to the material I referenced and gave a very brief description of what it is and how I used it.