In the relevant literature, it is often debated whether learning programming requires high-level thinking skills, the lack of which consequently results in the failure of students in programming. The complex nature of programming and individual differences, including study approaches, thinking styles, and the focus of supervision, all have an effect on students’ achievement in programming. How students learn programming and the relationships between their study approaches and their achievement in programming have not yet been adequately illuminated. In this regard, the present study aims to investigate the effect of the study approach used on students’ attitudes toward programming and on their academic achievement within an online problem-based learning environment. In this study, a single-factor, pretest posttest single group and semiempirical method was utilized. The study was conducted on 41 students from a public university in Turkey. To implement problem-based learning activities, a teaching environment was created with the Moodle platform, allowing for group work and discussions. Seven status of the problems were prepared exclusively for the 12-week application period so that students could make suggestions about how to solve them. In the data collection phase, the Study Approach Scale, the Attitude Towards Programming Scale, and the Academic Achievement Test were employed. T-test and covariance analyses were carried out in the statistical analysis phase. According to the findings of the present study, students adopting the “deep” study approach were more successful than the students adopting a “superficial” approach. Moreover, it was determined that the problem-based learning application had a positive effect on students’ attitudes toward programming and that the study approach did not significantly affect the students’ attitude toward programming.