AbstractResearch on the design of learning environments for K‐12 science education has been informed by two bodies of literature: inquiry‐based science and Constructionism. Inquiry‐based science has emphasized engagement in activities that reflect authentic scientific practices. Constructionism has focused on designing intuitively accessible authoring environments and microworlds that embody the structure of a content domain in program code. Learners build, extend, or explore artifacts to make sense of underlying mechanisms. In this paper, we bridge these bodies of work to argue that interacting with program code of a computational model can facilitate engagement in inquiry‐based science. Tinkering with code involves students playfully manipulating the code of a computational model to generate and pursue goals or questions in the model. We use data from video‐recorded interviews with eleven 10th grade students in which they demonstrate their tinkering explorations with code of models of biological phenomena, and describe related interactions with other students. We analyze these data using a conceptual framework of inquiry‐based science consisting of three components: pursuit of investigations, sense making of investigations, and engagement with a community. We characterize points of alignment between students’ tinkering and these components to argue that tinkering with code underlying computational models facilitated engagement in inquiry‐based science. We also demonstrate how it provided opportunities for disciplinary engagement in two ways: Computational engagement or using code as a representational medium to pursue questions of interest, and conceptual engagement, or coming to notice and explain resulting changes in the modeled phenomenon. More broadly, we argue that the constructionist approach of interacting with and manipulating program code of computational models can facilitate productive forms of engagement with inquiry‐based science. We discuss affordances of interacting with code as a way to engage in inquiry, and provide design recommendations for the adoption of manipulation of code as an inquiry practice. © 2017 Wiley Periodicals, Inc. J Res Sci Teach 54:615–641, 2017