Question: 12. (10 Points) Write a function hasOdd that, given a list of 2-dimensional list (a list containing lists) of numbers, returns True if there is


12. (10 Points) Write a function hasOdd that, given a list of 2-dimensional list (a list containing lists) of numbers, returns True if there is an odd number inside, and False otherwise. For example: >>> hasOdd ( [[1,2,3], [4,5], [6,7,8] ) ) True >>> hasodd ( [ [12,22], [32,42,52], [62,72,82] ] ) False >>> 13. (10 Points) Write a function doubleLetters that, given a word, returns the number of double (repeated consecutive) letters in that word. The function should be case-sensitive, upper and lower case letters are considered to be different. Triple letters count as 2 double letters, and so on ... >>> doubleLetters('mississippi') # ss,ss, pp >>> doubleLetters ('alligator') # ll >>> doubleLetters ('mom'). 0 >>> doubleLetters ('mmm') #counts mm, then mm 2 >>> double Letters ('Aardvark') #Aa doesnt count, a! ==A In Python3
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
