Question: (R language) Write a function called sided_die that takes one argument, This will be how many sides the die has. It returns a random

(R language) Write a function called sided_die that takes one argument, This

(R language) Write a function called sided_die that takes one argument, This will be how many sides the die has. It returns a random number between 1 and the number of sides, simulating the roll of a die with the specified number of sides sided_die(4) should return a random number from 1-4 inclusive sided_die(8) should return a random number from 1-8 inclusive

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Computer Network Questions!