Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.

image text in transcribed

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! OK

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Analysis Using SQL And Excel

Authors: Gordon S Linoff

2nd Edition

111902143X, 9781119021438

Students also viewed these Databases questions

Question

=+2 How can the effectiveness of global virtual teams be improved?

Answered: 1 week ago

Question

=+1 What are the major issues related to international T&D?

Answered: 1 week ago