In this chapter, we consider opportunities and challenges of integrating programming in school mathematics by looking closer at the Swedish case. Especially, we aim to unpack how the integration of programming in mathematics can affect students’ opportunities to develop mathematical competencies. Three examples taken from a Swedish research project are described and discussed in detail. In the first example, we focus on differences regarding syntax and semantics in programming and mathematics, relevant in a learning perspective. In the second and third examples, we highlight the teachers’ views of how programming may enhance the traditional learning of school mathematics, and describes one particular lesson where students solve pattern problems in Python. Each example is discussed in relation to different mathematical competencies.