I have written my function down below:

**dice.roll <- function(){**

** dice <- sample(1:6, size = 2, replace = TRUE)**

** return(sum(dice))**

**}**

However, when I want to test it out on the following:

```
dice.roll(n = 1, seed = 0)
```

```
dice.roll(n = 15, seed = 0)
```

```
dice.roll(n = 2.4, seed = 2) # Q1(b)i.
dice.roll(n = 2, seed = 'a') # Q1(b)ii.
dice.roll(n = c(2, 4), seed = c(2, 1)) # Q1(b)iii.
dice.roll(n = 6, seed = 0.7) # Q1(b)iv.
```

**The function always returns an error: unused arguements**

Any help is appreciated