LAB 5 On-site programming of team projects
Task
The on-site programming requires the development of a oral calculation program, which covers students of all ages in primary schools and improves the quick calculation ability of pupils' addition and subtraction (multiplication and division).
Functional requirement
\1. Applicable age range of oral calculation software: primary school students of all ages (primary school grade 1 to primary school grade 6);
\2. Different difficulty levels are set according to students of different ages. The difficulty levels are as follows:
a) Grade 1 to grade 2: addition and subtraction of integers within 100;
b) Grades 3 to 4: addition, subtraction, multiplication and division of integers;
c) Grades 5 to 6: addition, subtraction, multiplication and division including decimals.
\3. The test questions are automatically and randomly generated by the software;
\4. The number of test questions is determined by the user;
\5. After the answer is finished, the software automatically judges the user's scores.
Reference sample
Sample 1 :
Output: Please enter your grade?
Input: grade 2
Output: Please enter the number of questions?
Input: 2
Output: 10+24=?
Input: 34
Output: 33+44=?
Input: 87
Output: end! Wrong question, your score is 50.
Sample 2 :
Output: Please enter your grade?
Input: grade 6
Output: Please enter the number of questions?
Input: 3
Output: 10.2+21.55=?
Input: 31.75
Output: 12.4 * 22=?
Input: 272.8
Output: 150/3=?
Input: 50
Output: end! All right, that's great! Your score is 100.
Note: The words "Input:" and "Output:" in the sample do not need to be displayed in the specific coding.