subject

Sublist(xs, total)'
Description: It finds the smallest square-size sublist of a 2D list xs that the sum of its values is greater than or equal to total. Minimum size of a sublist is 2x2. If there are more than one equally sized sublists that satisfy the requirements, it returns the one with the largest sum.
If no sublist satisfies the requirements it returns False.

Parameters: xs (list of list of int), total (int). You’re not allowed to modify xs.
Return value: a square size list of list of int
Example:
sublist([[0,1,2], [-4,5,6), [7,8,3]],5) → [[5,6],[8,3]]
sublist([[0,1,2], [-4,5,6], [7,8,3]], 23) → [[0,1,2], [-4,5,6],[7,8,3]]

Code this in python 3.
•Built-in functions: range(),len(),int(),str()
•list methods: .append(), .insert()
•Not allowed to use slicing
•allowed to use the del operator

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 11:00
Eva has many contacts on the professional networking site she uses which contacts are considered second degree
Answers: 3
question
Computers and Technology, 22.06.2019 13:00
Which part of the cpu accepts data?
Answers: 1
question
Computers and Technology, 23.06.2019 02:00
Which of the following is not a source of sustainable raw materials? a) coal mine b) flick of sheep c) cotton plantation d) line forest.
Answers: 2
question
Computers and Technology, 23.06.2019 23:00
How do you know if the website is secure if you make a purchase
Answers: 2
You know the right answer?
Sublist(xs, total)'
Description: It finds the smallest square-size sublist of a 2D list xs tha...
Questions
question
Spanish, 25.11.2020 09:50
question
Mathematics, 25.11.2020 09:50
Questions on the website: 13722361