शुरू करेंमुफ़्त में शुरू करें

Four known values

Suppose that you pick up an iPhone with four smudge marks on it, at the locations of 3, 4, 5 and 9.

The actual value of the passcode has been preloaded as a variable called passcode.

यह अभ्यास पाठ्यक्रम का हिस्सा है

Probability Puzzles in R

पाठ्यक्रम देखें

अभ्यास निर्देश

  • Store the known values into the variable called values.
  • Create the guess using those four values.
  • Fill in the condition to check whether the guess is correct or not.

इंटरैक्टिव व्यावहारिक अभ्यास

इस अभ्यास को इस नमूना कोड को पूरा करके आज़माएँ।

counter <- 0

# Store known values 
values <- 

for(i in 1:10000){
  # Create the guess
  guess <- 
  # Check condition 
  if(___){
    counter <- counter + 1
  }
}

print(counter/10000)
कोड संपादित करें और चलाएँ