Question
In the game Clacker, the numbers 1 through 12 are initially displayed. The player throws two dice and may cover the number representing the total
In the game Clacker, the numbers 1 through 12 are initially displayed. The player throws two dice and may cover the number representing the total or the two numbers on the dice. For example, for a throw of 3 and 5, the player may cover the 3 and the 5 or just the 8. Play continues until all the numbers are covered. The goal is to cover all the numbers in the fewest rolls.
Make a Clacker application that displays 12 buttons numbered 1 through 12. Each of these buttons can be clicked to "cover" it. A covered button displays nothing. Another button labeled Roll can be clicked to roll the dice. Include labels to display the appropriate die images for each roll. Another label displays the number of rolls taken. A New Game button can be clicked to clear the labels and uncover the buttons for a new game.
The dice picture must be displayed when user clicks the buttom
Step by Step Solution
There are 3 Steps involved in it
Step: 1
import tkinter as tk from tkinter import messagebox from random import randint from PIL import 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
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