Closed akmcmasters closed 4 years ago
remainder <- function(num, divisor = 2) { num %% divisor }
submit()
| Sourcing your script...
| All that hard work is paying off!
|=================== | 33% | Let's do some testing of the remainder function. Run remainder(5) and see what happens.
remainder(5) [1] 1
| You are doing so well!
pls explain how the %% works to produce 1 from 5 %% 2
5 is divisible by 2, 2 times = 4, the remainder %% = 1
remainder <- function(num, divisor = 2) { num %% divisor }
| Sourcing your script...
| All that hard work is paying off!
|=================== | 33% | Let's do some testing of the remainder function. Run remainder(5) and see what happens.
| You are doing so well!
pls explain how the %% works to produce 1 from 5 %% 2