Answer to Question #59658 in Python for Typicalsmartguy
and subtraction. The GUI should contain two Entry widgets and a Button widget labeled
At start-up, your program should generate (1) two single-digit pseudorandom numbers
a and b and (2) an operation o, which could be addition or subtraction—with equal
likelihood—using the randrange() function in the random module. The expression a o
b will then be displayed in the first Entry widget (unless a is less than b and the operation
o is subtraction, in which case b o 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.
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 (just the Return
key on the keyboard. If the correct result is entered, a new window should say "You got
Need a fast expert's response?Submit order
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!