F&A Diskussionen
What next?
1 Stimme
2 Antwortendef manipulate_data(n):
positives,negatives=[],[]
if not isinstance(n,list):
return
else:
for i in n:
if i>=0:
positives.append(i)
if i<0
negatives.append(i)
new=[len(positives,sum(negatives)]
return new.
please the unittest is still telling me that my code failed the "only lists" allowed test.what do I do.
0 Stimmen
7 Antwortendef manipulate_data(n):
positives,negatives=[],[]
if not isinstance(n,list):
raise ValueError
return
else:
for i in n:
if i>=0:
positives.append(i)
if i<0
negatives.append(i)
new=[len(positives,sum(negatives)]
return new.
Someone kindly assist I keep running it in unitests and I keep getting errors.
Here's the question:
0 Stimmen
2 AntwortenHeute heiß
Ejercicio Pytho
0 Votes
What is that z for
0 Votes
Suggestions needed
4 Votes
Please rate my code from 1 to 10
2 Votes
How to start
0 Votes
Help me please
0 Votes