Abstract
The article provides a way to optimize an enumeration process in the Python programming language while solving crypto-arithmetic (enumerative) tasks where two multi-digit numbers add to each other in a column. It is noted that there are two directions in fulfilling enumeration problems which suggest being optimized by combinatorial (algebraic) and programming methods. Moreover, it has been found out that it is impractical to express algebraic optimization methods directly in program codes, since programming languages have their own possibilities for optimizing search procedures.Therefore, the process of learning how to optimize search while fulfilling enumerative tasks should be carried out in two stages. Combinatorial methods are the best means of forming students’ logical mindsets and algorithmic skills. That is the reason why these methods should necessarily be included in the informatics course at the level of general secondary education. Then, at the advanced stage of training, or at the level of secondary general education, it is useful for students to move to the programming direction mastering high-level programming languages.The optimizing strategy of solving crypto-arithmetic problems described in the article, and its implementation in the Python language involves omitting conventional cyclic structures, as well as widely known methods of processing character data. When compiling a computer program "слова.py", the authors applied the join method and the permutations function of the itertools module from the Python standard library. This choice has greatly simplified the recording of the program codes and reduced the time it took to search for the solution.
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have
Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.