Teaching programming in a comprehensive school is a long and difficult process, which is why it should be analysed from various points of views. An analysis of pupils’ opinion on the lesson of programming basics has been carried out by combining pedagogical observation method with continuing questionnaires of pupils. Having processed the data of analysis, it has been determined that pupils’ cooperation with teacher and friends has a considerable influence on the success of learning programming. Moreover, the analysis has revealed that not only the final result is important but also the process of learning. In this article, the most common difficulties that pupils encounter when learning programming are discussed and their reasons are indicated. Having processed the results of pupils’ test task solutions, an attempt was made to determine if the pupils evaluate their knowledge, abilities and skills objectively. Finally, recommendations to teachers are given on the grounds of the results of the analysis.