Software Engineering pair Job 02-Arithmetic four

Source: Internet
Author: User

First, the procedure requirements

1, the generated problem in the calculation process can not produce negative numbers, that is, the arithmetic expression if there is a e1−e2, such as a sub-expression, then e1≥e2.

2. If there is a sub-expression like E1÷e2 in the generated topic, the result should be a true fraction.

3. The number of operators appearing in each topic does not exceed 3, brackets are not limited.

4, the program once run the generation of the problem can not be repeated, that any two topics can not be changed by the finite Exchange + and the arithmetic expression around x to the same topic.

For example, 23 + 45 = and 45 + 23 = are repetitive topics, 6x8 = and 8x6 = are also repetitive topics.

The two topics of 2+1 and 1+2+3 are repetitive, because the + is left-associative, and 1+2+3 is equivalent to (1+2) +3, which is the total (1+2), which is (2+1).

However, 1+2+3 and 3+2+1 are two non-repetitive problems, because 1+2+3 is equivalent to (1+2) +3, and 3+2+1 is equivalent to (3+2) +1, and they cannot be changed to the same subject by a finite exchange.

5, the program into a Web-based program, smart phone program, with an operational interface of the single version of the program three, the user by setting parameters, you can get a variety of topics, and can achieve online answer and evaluation.

Second, the procedure design thought

1.

Software Engineering pair Job 02-Arithmetic four

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.