Why do I keep getting a loop when knitting?
From what you are saying it sounds like you are getting a loop at the end of your run of knit stitches when you go to purl stitch.  If this is the case, I have experimented to confirm the cause and believe you are not bringing the yarn around the needle to the front before you purl.

Do not bring the yarn over your needle.  This could possibly be why you are also getting an extra stitch (11 stitches instead of 10).  It needs to go around it to the front (bring it in between the 2 needles to get it to the front). Knit stitch has the yarn at the back, and purl stitch has the yarn at the front.