daily pastebin goal
59%
SHARE
TWEET

Untitled

a guest Jan 18th, 2019 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function validateAnswer(answer, randomLetters[])
  2.     if answer.length > 10:
  3.         print("0")          ### Checks to see if the answer is within the valid size (10)
  4.     else:
  5.         for i in range(answer.length()):
  6.             if randomLetters[0] is in answer:
  7.                 randomLetters.remove[0]         ### Checks if the letters in the answer are in the given 10 letters
  8.             else:                               ### Also returns "0" if there are repeated letters as the originals are removed if used
  9.                 print("0")
  10.             if randomLetters.length() == 0:
  11.                 print(answer.length())
  12. endFunction
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top