Guest User

Untitled

a guest
Jan 9th, 2018
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. lines = ["qwertyuiop","asdfghjkl","zxcvbnm"]
  2. triples = []
  3. for line in lines:
  4. for i in range(len(line)-2):
  5. triples.append(line[i:i+3])
  6. input_string = input().strip().lower()
  7. score = 0
  8. for triple in triples:
  9. number_of_occurrences = input_string.count(triple)
  10. score += 5 * number_of_occurrences
  11. print (score)
Add Comment
Please, Sign In to add comment