This article reports on a design-based research study centered on the conception and the assessment of the Pyrates application. This online serious game aims at introducing Python programming to K–12 students while easing the transition from block-based to text-based languages. After we present the various aspects underlying the block-to-text transition as well as the related existing applications, we describe the design of Pyrates . First, we built the levels of the game to deal with the different fundamental concepts of programming in a constructivist approach. Next, we were inspired by advantageous characteristics of block-based programming editors to create the editing environment of Pyrates . To assess this conception, we tested the application in eight classrooms with 240 French 14–15 years old students. Students’ activity traces have been collected and were augmented by a qualitative online survey. By analyzing this dataset, we showed that the levels’ design generally allows to apprehend the targeted concepts consistently with the constructivist principles. Regarding the editing environment, we established that it supports the block-to-text transition in several aspects: concept transposition (general models and illustrative examples), reduction of errors (beginners aware syntax analyzer), command catalog (programming memo for discovery and syntax reference), and program composition (copy button that limits keyboarding). Finally, Pyrates , which has already been played over 140,000 times, offers practitioners an environment that facilitates the transition from blocks to text, as well as a serious game to master the fundamental concepts of Python programming, and novel avenues to follow for tool designers.