Coding for pupils has become a new trend in information communication technology (ICT) education as it is a gateway to the new digital era for future generations where computers are one of the backbones of modern society. In this respect, the present study aimed at investigating the usefulness and impact of teaching coding through "Scratch" (i.e., a coding software for pupils) on Moroccan pupils, measuring their capacity to learn coding and finally exploring Moroccan teachers' perceptions about it. Therefore, a pre-test post-test experimental course study took place targeting 38 pupils of the 6 th grade in a rural area school. The control group (19 participants) was not taught the basics of Scratch coding while the experimental group (19 participants) was taught through practical Scratch coding initiation lessons based on the theory-based model for computer programming teaching. Furthermore, a quantitative survey questionnaire was used to gather 5 th and 6 th grade teachers (202 participants) perceptions about Scratch. The Statistical Package for Social Sciences was used to analyze the data. The results of the quantitative questionnaire showed that Moroccan teachers endorse Scratch teaching for its potential benefits while the experimental study results proved that computer coding can be easily be integrated in Moroccan schools. The software is suitable for the students since they demonstrated significant interest in coding and have experienced positive impacts on various competencies.