Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- lines = ["qwertyuiop","asdfghjkl","zxcvbnm"]
- triples = []
- for line in lines:
- for i in range(len(line)-2):
- triples.append(line[i:i+3])
- input_string = input().strip().lower()
- score = 0
- for triple in triples:
- number_of_occurrences = input_string.count(triple)
- score += 5 * number_of_occurrences
- print (score)
Add Comment
Please, Sign In to add comment