Cooperative learning manifests itself as pair programming in coding education. There is a limited number of studies experimentally demonstrating that pair programming is effective in the educational context. Therefore, in this study, solo and pair programming were compared in terms of flow experience, coding quality, and coding achievement. The method used in this study is a pretest-posttest quasi-experimental design. The study group consists of 42 volunteer senior university students (28 males, 14 females). While solo programming was performed in the control group, pair programming was performed in the experimental group. It was concluded that the flow experience of the experimental group was higher than that of the control group in four weeks of the six-week implementation, whereas the coding quality of the experimental group was higher in three weeks. No difference was found in the other weeks in terms of both flow experience and coding quality. Although the coding achievement of both the control and experimental groups increased in the study, the experimental group did not exhibit better performance in terms of coding achievement. In conclusion, since it was revealed in this study that pair programming is effective, it is recommended to use pair programming more frequently in educational settings.