Students should be able to express their knowledge in a manner that computers can understand. We aim to improve students' computational thinking (CT) and to express knowledge representation through programming education. We have developed a tool to measure students' CT. Tests were conducted using pattern analysis, conditional comparison, abstraction, automation, and algorithm design. Through Python programming education, we taught students’ the knowledge expression needed to solve various problems, and then conducted a post-test. We analysed the correlations between the academic performance of students and their computer-related knowledge and expression skills. Even though students were unfamiliar with computer programming terminology and concepts, programming and computing education was administered based on problems that could be solved using elementary mathematics. There was no significant difference between the results of the initial students’ assessments and the results after the lecture. However, the correlation between the students’ assessments and actual academic performance was high. These studies provide a pilot model of how tools can be used to express and measure students’ knowledge of CT. Based on these results, students can learn a variety of techniques to express their knowledge and continue to improve upon such.