IT-based learning has proven to be a useful approach to educate people regardless of their age or other characteristics. However, the developments in IT and its socio-economic implications have a high influence on education with new approaches and methods, such as the playful learning approach (PLA). This approach has been widely researched and can be applied to teach programming as one of the core digital skills. However, scientifically developed and validated structures for PLA units in programming are rare. In this paper, we offer a lesson structure for a PLA to programming by addressing the five core success factors of playful learning. Our structure includes six units and follows an iterative and agile procedure by combining game features with the educational content. Educators and teachers can use the presented results to design the lesson structure in their classes. Furthermore it offers a basis for further research in the area of PLA and can be used as a starting point for the development of educational games and concepts in teaching how to program.