PYTHON CS1 PROBLEM Define a function that takes a list of lists, glol, as a parameter. You may assume that the inner lists in glol are lists of positive integers. Your function should return True if at least one of the inner lists in glol contains two or more multiples of 10. Otherwise it should return False. For example: If glol = [ ] then your function returns False. If glol = [[ ], [4, 2]] then your function returns False. If glol = [[10, 2, 6, 8], [12, 6], [15, 20, 5]] then your function returns False. If glol = [[10, 2, 6], [12, 6], [10, 2, 70, 15], [15, 10, 5]] then your function returns True as the inner list [10, 2, 70, 15] contains 10 and 70. If glol = [[10, 2, 6], [12, 6], [10, 7, 15], [50, 10, 50, 4, 6]] then your function returns True as the inner list [50, 10, 50, 4, 6] contains 50 twice. 6. If glol = [[10, 20, 6, 90], [12, 6], [ 7, 3, 15], [50, 10, 50, 4, 7]] then your function returns True as the inner lists [50, 10, 50, 4, 7] and [10, 20, 6, 90] contain more that two multiples of 10.

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter7: Arrays
Section7.5: Case Studies
Problem 3E
icon
Related questions
Question

PYTHON CS1 PROBLEM

Define a function that takes a list of lists, glol, as a parameter. You may assume that the inner lists in glol are lists of positive integers. Your function should return True if at least one of the inner lists in glol contains two or more multiples of 10. Otherwise it should return False. For example:

  1. If glol = [ ] then your function returns False.

  2. If glol = [[ ], [4, 2]] then your function returns False.

  3. If glol = [[10, 2, 6, 8], [12, 6], [15, 20, 5]] then your function returns False.

  4. If glol = [[10, 2, 6], [12, 6], [10, 2, 70, 15], [15, 10, 5]] then your function returns True

    as the inner list [10, 2, 70, 15] contains 10 and 70.

  5. If glol = [[10, 2, 6], [12, 6], [10, 7, 15], [50, 10, 50, 4, 6]] then your function returns

    True as the inner list [50, 10, 50, 4, 6] contains 50 twice.

6. If glol = [[10, 20, 6, 90], [12, 6], [ 7, 3, 15], [50, 10, 50, 4, 7]] then your function returns True as the inner lists [50, 10, 50, 4, 7] and [10, 20, 6, 90] contain more that two multiples of 10.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Knowledge Booster
Linked List Representation
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr