In this Python tutorial, we will learn to define and execute some intermediate to advanced Python functions by creating a python dice game example. In this Python tutorial, I am running Python IDLE (Python GUI) version 3.7.2

Within the Python functions, one will be able to pass data, which are known as parameters and the function will return the result as data.

Python Rolling Dice Game Functions

Ask user for input of name

Create virtual names of the second player to be chosen at random on each play

Virtual Mars

Virtual Jupiter

Virtual Neptune

Virtual Saturn

Virtual Earth

Virtual Venus

Virtual Uranus

Virtual Mercury

Create variables of the dice that are random number generators – min number of 1 and max number of 6

if/elif statements for equal, greater and larger than to validate the winner of the game

while statement to keep the game active until the player decided to stop playing