Are you pressed for time and haven’t started working on your assignment yet? Would you like to buy an assignment? Use our custom writing services for better grades. Even if your deadline is approaching fast, our writers can handle your task right when you need it.
Order a Similar Paper Order a Different Paper
For this lab, start with your completed lab 13.
Now, instead of just passing the dice rolling method the number of dice to roll, also pass a second value. This second value should be the size of the dice.
- In D&D, there are 4, 6, 8, 10, 12, 20, 30 etc… sided dice.
- So, perhaps you will tell the method to roll 2, 6 sided dice.
- Or perhaps you will tell the method to roll 1, 8 sided die.
- Or maybe even you will tell the method to roll 13, 9 sided dice. (not sure if that is a thing…)
So, in this case, your roll dice method must accept two parameters.
So far, when using random, we have gone from a set range such as:
How can you change that line (it will be the 7 that gets changed) to accommodate a value that isn’t known before the program is executed?