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

Dice v3-rollDice(?)

Objectives

The student will refactor their rollDice(numberOfSide) function of the Dice program by including the following new concepts:
  • change the required parameter (argument) to an optional parameter
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(numberOfSides) so that the parameter will be optional, set the default value of the numberOfSides to 6
  • update the previous program documentation.

Comments