Skip to content

Instantly share code, notes, and snippets.

@itsdebartha
Last active April 24, 2022 07:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save itsdebartha/0e883e231f8ff822d7dfbc43ff413738 to your computer and use it in GitHub Desktop.
Save itsdebartha/0e883e231f8ff822d7dfbc43ff413738 to your computer and use it in GitHub Desktop.
rolls<-function(n) #function
{
x<-sample(1:6,n,replace=T) #roll n times
if(length(unique(x))==6) return(1) #if the number of unique outcomes is 1
#return 1
else return(0) #else return 0
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment