-
-
Save itsdebartha/5fcfdd11762a5d1b91ba25b59a899885 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rolls<-function(n) #function | |
{ | |
x<-sample(1:6,n,replace=T) #roll n times | |
return(all(x==sort(x))) #return if all the values are in a | |
#non-decreasing sequence or not | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment