You could try coding a solution to a real problem a friend or family member has on a computer. This could be a particularly good way to practice coding if you're creating the solution for someone who's relativly inexperienced with computers - those kind of people will ask you questions that another coder never would. These real-world questions about your solution might be things like, "Why does this come up in a black window with all this writing?" - in reference to a script running from a DOS command prompt. When you get hit with questions like that, you need to have a firm grasp on your own understanding of the language, and must be able to respond in layman's terms in order to be able to answer them.
I'm in the process of learning perl at the moment and I'm using it to design an property management system for a family member who runs an apartment complex.
By building something for someone who's close to you and expecting you to finish it, you might find yourself more motivated to write the entire solution instead of stopping halfway.