Create a graphics window program that will display the 5 side of a dice (see below second image).

You will need to have 3 functions. The main function, the dice function, the dot function. The main function calls the dice function which draws the white background representing the dice. The dice function calls the dot function which draws each of the 5 dots for every time it is called (see below first image).

Here is a suggestion for building this program.

First: Just build the program only using the main() function.

Second: Create a function called dice() to "draw" the white background.

Third: Create another function called dot(). This function will draw all 5 dots.

Forth: Change the order of the functions so that - From the main() function you call a dice() function to "build the dice. To draw the dots you will then need to call the dot() function (see below first image).

NOTE: Call the dot() function 5 times from the dice() function rather than drawing 5 dots inside the dice() function. There is no user input or interaction, the user is just running the program and the 5 side dice appears. see image.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.