This is a practical report on the guidance of the sixth grade science "use of electricity". In the means to achieve the purpose of learning, the activity based on the programming idea such as thinking about the optimal solution was examined how it contributed to the acquisition of knowledge and skill in addition to the improvement of the learning motivation.