Skip to content

Instantly share code, notes, and snippets.

@itsdebartha
Last active August 22, 2022 14:14
Show Gist options
  • Save itsdebartha/5fcfdd11762a5d1b91ba25b59a899885 to your computer and use it in GitHub Desktop.
Save itsdebartha/5fcfdd11762a5d1b91ba25b59a899885 to your computer and use it in GitHub Desktop.
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