Q&A Discussions
Can anyone explain
1 Vote
2 AnswersReturn, plz, help
5 Votes
5 AnswersWho can explain?
0 Votes
1 AnswerHow do i do that
0 Votes
6 AnswersFunction output
0 Votes
5 Answerswhats wrong?
0 Votes
3 AnswersPython programming
0 Votes
3 AnswersMistake Pls Help 🥺
-1 Vote
2 AnswersPython Method Not Returning
4 Votes
7 Answersdef 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 Votes
7 Answersdef 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 Votes
2 AnswersInvalid syntax
1 Vote
2 Answersfunction problem
0 Votes
1 AnswerMissing code
0 Votes
3 AnswersBasic python difficulty
0 Votes
1 Answerdef 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 Votes
2 AnswersSimple code issue
1 Vote
1 AnswerHot today
Time up code for data revision
0 Votes
Web vs python
1 Votes
Best Python Calculator Code
1 Votes
I want to learn why this error occurs in "while loop" function of Pythone.Can someone explain to me?
1 Votes
Animation
2 Votes
Clean Code
2 Votes
While or for loop
0 Votes
how to import in pygame
0 Votes