Q&A Discussões
What is unittest in Python?
10 Votos
3 RespostasWhat do code?
1 Voto
4 Respostasdef 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 Voto
7 Respostasguys this code I wrote passed all the unittest specifications in an oop lab. but they told me that I failed a hidden test. that my code can still be improved upon. I've tried my best but I don't know how to improve the code again. please give me ideas. am I using WET in any block. any unnecessary repetitions or redundancy? this is the code below:
http://www.sololearn.com/app/python/playground/cG5UEvIEkuHd/
0 Voto
4 RespostasQuente hoje
Sticky position
3 Votes
Help please?
3 Votes
Ejercicio Pytho
0 Votes
Online voting system
2 Votes
Suggestions needed
4 Votes
What is that z for
0 Votes