06.0 Python‎ > ‎Python Projects‎ > ‎Dice Project‎ > ‎

Dice v2-rollDice(x)

Objectives

The student will refactor their rollDice() function of the Dice program by including the following new concepts:
  • add a parameter (argument) to a programmer defined function that returns a value
The student will practice the following familiar concepts:
  • learning objectives from the previous Dice programs 
  • update program documentation   """docstring"""

Program Description

Note:  Parameters (or arguments) are used in programs to increase flexibility of the code.

BEFORE MODIFYING YOUR PROGRAM, CREATE A COPY OF IT TO KEEP
  • Refactor (modify) a copy of your Dice program. 
  • modify rollDie() to include a parameter that represents the number of sides that the dice will have 
  • update the previous program documentation.

Comments