Advertisement
Enrro

avoids110433

Nov 4th, 2014
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. '''
  2. Created on 04/11/2014
  3. avoids
  4. Proven and tested on python 3.3.3
  5. @author: A01221672
  6. '''
  7. def avoids(word,forbidden):
  8. c1 = 0
  9. for letter in range(len(word)):
  10. if word[letter] == forbidden or word[letter].upper():
  11. c1 = c1 + 1
  12. if c1 == 0:
  13. print("True")
  14. else:
  15. print("False")
  16.  
  17. avoids("Edgar","e")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement