Arithmetic 2 design ideas

Source: Internet
Author: User

I. Avoid duplication of topics

Save the two operands and operation symbols of the topic to three arrays, and then compare the operands and the operation symbols in the array after each question. If all three are the same, re-set the question, and if not the same, store the data in an array and continue the quiz.

Second, can be customized

Set two variables to control the number and printing method, entered by the user.

Third, whether there is multiplication law

Subtraction can take 4 of the remainder to control, does not support the multiplication method can take 2 of the remainder to control.

Iv. Range of values

The range of values is determined by controlling the generation range of random numbers.

Five, plus and minus there are no negative

By randomly generating a number n, using (-1) The N-square to control whether it is negative, negative print to add parentheses such as: 1+ (-3) = or 3-(-1) =.

Six, Division has no number

After the random number is generated, the validation can be divisible and printed again, or the random number is regenerated.

Seven, whether to support the score

Generates 4 random numbers representing two molecules and two denominators, respectively.

Arithmetic 2 design ideas

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.