Question
Develop a computer program in python that teach the children how to answer addition and subtraction questions correctly by giving them a statement that expresses
Develop a computer program in python that teach the children how to answer addition and subtraction questions correctly by giving them a statement that expresses an arithmetic equation in the form of LEFT_OPERAND SIGN RIGHT_OPERAND = ? The program will then present three possible choices for the child with only one correct choice (and two other wrong choices known as distractors). For example, below is a sample run:
The following additional requirements should be included in your program:
1. The program should be well designed using separate functions and the programmer should not use the same function to perform multiple tasks. In addition, the programmer needs to use functions to reduce the repetition of the same code in different functions.
2. It requires that children learn how to add and subtract odd and even numbers correctly. Therefore, your program should randomly show one of three possible question types in each run in which (type 1) both operands are even, or (type 2) both operands are odd or (type 3) one even operand and another odd operand.
3. When a child selects an incorrect answer the program should display the correct answer and then ask the child the same type of question again with different operands. The program continues to ask the same type of question until the child give correct answer. When the child answers the question correctly, it shows another question type from the remaining two types.
4. The program should select random numbers for the operands in the range 1 to 100. The program first generates small random numbers (level 1: range 1 to 20) for the first round of three question types until the child answers all three question types correctly. Then it progressively shows harder questions in the next rounds by selecting random numbers for the operands in the ranges (level 2: 21 to 40), (level 3: 41 to 60), (level 4: 61 to 80) and (level 5: 81 to 100). Each round is completed when the child answers all three question types correctly.
5. The program should present 3 choices for the child with only one correct answer. The wrong choices or distractors must differ from the correct choice by an absolute maximum of 2. For example, if the correct answer is 10 then the wrong choices can be any number from the following list: [8,9,11,12]. The wrong choices can be selected randomly from the possible list of numbers, however, the same number cannot be selected twice or in other words two wrong choices cannot use the same number. The three choices must be ordered randomly each time a question is generated so that the correct answer is not always in the same position (correct choice can be A or B or C).
6. For subtraction questions LEFT OPERAND must be always greater than RIGHT OPERAND to avoid negative numbers answers.
7. The child may exit the program gracefully any time by typing 0 at the input prompt.
8. You may specify additional assumptions if needed (but must be stated clearly).
11+7= ? Select correct answer: A) 16 B) 18 C) 19 Enter your answer: B Well done!! Your answer is correct :) 4+8= ? Select correct answer: A) 12 B) 13 C) 15 Enter your answer: C Incorrect answer : ( The correct answer is 12 11+7= ? Select correct answer: A) 16 B) 18 C) 19 Enter your answer: B Well done!! Your answer is correct :) 4+8= ? Select correct answer: A) 12 B) 13 C) 15 Enter your answer: C Incorrect answer : ( The correct answer is 12Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started