Answer to Question #62739 in Python for chrls

Question #62739
def manipulate_data(data):
if isinstance(data, (list, tuple, set)):
return [len([n for n in data if isinstance(n, int) and n >= 0]), sum(n for n in data if isinstance(n, int) and n < 0)]
return 0
when i input this code it says test_only_lists_allowed

Failure in line 11, in test_only_lists_allowed self.assertEqual(result, 'Only lists allowed', msg='Invalid argument') AssertionError: Invalid argument
1
Expert's answer
2016-10-21T13:05:11-0400
The answer to the question is available in the PDF file https://www.assignmentexpert.com/https://www.assignmentexpert.com/homework-answers/programming-answer-62739.pdf

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS