Dyskusje Q&A
What is unittest in Python?
10 głosów
3 odpowiedziWhat is unittest in python?
6 głosów
2 odpowiedziWhat is unittest in Python?
3 głosów
1 OdpowiedźWhat do code?
1 Głos
4 odpowiedziWat is doing deze python code
0 głosów
1 Odpowiedźdef 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 głosów
7 odpowiedziКак пользоваться unittest?
0 głosów
1 Odpowiedźguys 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 głosów
4 odpowiedziPopularne dzisiaj
Fast coding (mobile)
1 Votes
..
1 Votes
DSA doubt
1 Votes
Coding help
2 Votes
Bridge pattern use case
0 Votes
Data structure using C
0 Votes
Input errors (python)
1 Votes
Without degree job
0 Votes