1) Write a function letter_score(letter) that takes a lowercase letter as input and returns the value of...
Question:
1) Write a function letter_score(letter) that takes a lowercase letter as input and returns the value of that letter as a scrabble tile. If letter is not a lowercase letter from ‘a’ to ‘z’, the function should return 0. This function does not require recursion.
Here is the mapping of letters to scores that you should use:
2) Write a function scrabble_score(word) that takes as input a string word containing only lowercase letters, and that uses recursion to compute and return the scrabble score of that string – i.e., the sum of the scrabble scores of its letters.
3) Write a function compare(s1, s2) that takes as inputs two strings s1 and s2 (which you can assume have the same length) and uses recursion to compare two strings and to return the number of positions at which they have different characters
4) Write a function weave(vals1, vals2) that takes as inputs two lists vals1 and vals2 and uses recursion to construct and return a new list that is formed by “weaving” together the elements in the lists vals1 and vals2 to create a single list. The new list should alternate elements from the two lists: the first element from vals1, followed by the first element from vals2, followed by the second element from vals1, followed by the second element from vals2, etc.