The last time the simple random generation of 30 operational problems of the small program is far from meeting the needs of the public, now the teacher put forward the following requirements
1. Avoid duplication of topics
2. Can be customized (quantity, printing method)
3. The following parameters can be controlled: whether there is a multiplication method, whether there is a bracket, a range of values, plus or minus negative numbers, the division has no number, whether to support fractions (true and false score), whether to support decimals (accurate to how many bits), the interval adjustment of each line in the printing
On the basis of the previous I wrote a simple writing about this design idea
1. To avoid duplication to store previously generated topics, the resulting topics are compared to the previous, such as the process of continuing to generate duplicates with repeated discards
2. In order to enable users to customize the number and printing method, you can enter the printing method, the number of parameters to set
3. Parameter setting: Prompt the user whether have multiplication arithmetic operation, the user can enter "y/n" to indicate, prompt the user whether to support decimal, and enter the exact number of digits
Design ideas of Arithmetic sequel