swirldev / swirl

:cyclone: Learn R, in R.
http://swirlstats.com
Other
1.14k stars 598 forks source link

Malfunction in Functions- Remainder Section #913

Open Emilylawson opened 1 year ago

Emilylawson commented 1 year ago

I have made my code and double checked in lots of places, it seems right.

I have

remainder <- function (num, divisor = 2) { num %% divisor submit() }

And every time I try it says not quite or something in that vein.

I had a similar problem in the logic section with && and had to just quit and move on, even though I was only 30% done.

I really love this program, it's so helpful. Just a few kinks to work out and then it'd be perfect!

alieana008 commented 3 weeks ago

The script should not have the submit() line in it, that is only for use in the console. This will be a continual issue as every lesson works this same way. Otherwise, your function is correct.

remainder <- function(num, divisor=2) { num %% divisor }