Programming recently became mandatory in Swedish compulsory schools (age group 7-16); this article contributes to our understanding of novice learners’ different approaches when programming. The study builds on observations and informal conversations during programming lessons at three Swedish science centres. At the time of the study, science centres already had experience of programming education as they offered courses for pupils. This was used as a complement to teaching at compulsory school. We apply a design-for-learning perspective to help us understand how contextual aspects influence what novice pupils do and how they design their learning during programming lessons. During the analysis process, we combine thematic analysis with the Learning Design Sequence (LDS) model. We identify five qualitatively different approaches that pupils take to solve programming problems: mathematically, trial and error, step-by-step, routine as well as aesthetic. Each of these approaches allows pupils to use and practice different abilities that are important for programming. We discuss how these abilities can be compared to computational thinking (CT). The study provides an insight how pupils are involved in designing their own learning when using their abilities to solve programming assignments.