Question
Python 3.7.3 Develop new GUI widget class Ed that can be used to teach first-graders addition and subtraction. The GUI should contain two Entry widgets
Python 3.7.3
Develop new GUI widget class Ed that can be used to teach first-graders addition and subtraction. The GUI should contain two Entry widgets and a Button widget labeled "Enter".
At start-up, your program should generate (1) two single-digit pseudorandom numbers a and b and (2) an operation op, which could be addition or subtractionwith equal likelihoodusing the randrange() function in the random module. The expression a op b will then be displayed in the first Entry widget (unless a is less than b and the operation op is subtraction, in which case b op a is displayed, so the result is never negative). Expressions displayed could be, for example, 3+2, 4+7, 5-2, 3-3 but could not be 2-6.
Augment the GUI you developed in #2a so that a new problem gets generated after the user answers a problem correctly. In addition, your app should keep track of the number of tries for each problem and include that information in the message displayed when the user gets the problem right.
Enhance the widget Ed from #2b so that it does not repeat a problem given recently. More precisely, ensure that a new problem is always different from the previous 10 problems.
2-0 = Enter The user will have to enter in the second Entry widget, the result of evaluating the expression shown in the first Entry widget and click the "Enter" button (or the key on the keyboard)., as so: tk 2-0 = Enter If the correct result is entered a new window should say "You got it!" Yes!!! You got it! OK 2-0 = Enter The user will have to enter in the second Entry widget, the result of evaluating the expression shown in the first Entry widget and click the "Enter" button (or the key on the keyboard)., as so: tk 2-0 = Enter If the correct result is entered a new window should say "You got it!" Yes!!! You got it! OKStep 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