Q&A Discussões
Can anyone explain
1 Voto
2 RespostasHelp me
1 Voto
4 RespostasReturn, plz, help
5 Votos
5 RespostasWho can explain?
0 Voto
1 RespostaHow do i do that
0 Voto
6 RespostasFunction output
0 Voto
5 Respostasdef__
3 Votos
4 Respostaswhats wrong?
0 Voto
3 Respostaspython
0 Voto
1 RespostaPython programming
0 Voto
3 RespostasMistake Pls Help 🥺
-1 Voto
2 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 Respostashow
0 Voto
3 Respostasdef add(x, y):
return x + y
def do_twice(func, x, y):
return func(func(x, y), func(x, y))
a = 5
b = 10
print(do_twice(add, a, b))
Please explain step by step
Which is caller here?
Explain the 3rd and 4th line ?
why in 4th line we write add(add(x,y),add(x,y)) which is function of 1st line ?
how can we write function after return statement insted of (x+y+x+y )=30?
0 Voto
2 RespostasInvalid syntax
1 Voto
2 Respostasfunction problem
0 Voto
1 RespostaMissing code
0 Voto
3 Respostasdef 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 Voto
2 RespostasSimple code issue
1 Voto
1 RespostaQuente hoje
C pointers
2 Votes
Python
0 Votes
Guys help please
0 Votes
Slicing in python
1 Votes
Python question
1 Votes
Control flow
0 Votes
HTML
0 Votes
Front-end vs Full-stack
1 Votes