Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribedimage text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design For Mere Mortals

Authors: Michael J Hernandez

4th Edition

978-0136788041

More Books

Students also viewed these Databases questions

Question

Explain in brief the functions and functioning of stock exchanges.

Answered: 1 week ago

Question

=+d. Is there another print vehicle you would suggest?

Answered: 1 week ago