Question
I need help with the following assignment, I cannot figure out how to get the count to display in the box/button inside the widget. This
I need help with the following assignment, I cannot figure out how to get the count to display in the box/button inside the widget.
This is the double die roller program:
from button import Button from die_view import DieView from graphics import * def main(): win = GraphWin("Double Die Roller", 200, 200) win.setBackground( 'dark green' ) dieView1 = DieView( win, Point( 50, 60 ), 80 ) dieView2 = DieView( win, Point( 150, 60 ), 80 ) rollButton = Button( win, Point( 100, 160), 100, 40, "Roll!" ) while True: mouseClick = win.getMouse() if rollButton.wasClickedIn( mouseClick ): dieView1.roll() dieView2.roll() main()
Step 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