Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started