Q&A Discussies
Can anyone explain
1 Stem
2 AntwoordenHelp me
1 Stem
4 AntwoordenReturn, plz, help
5 Stemmen
5 AntwoordenWho can explain?
0 Stemmen
1 AntwoordHow do i do that
0 Stemmen
6 AntwoordenFunction output
0 Stemmen
5 Antwoordendef__
3 Stemmen
4 Antwoordenwhats wrong?
0 Stemmen
3 Antwoordenpython
0 Stemmen
1 AntwoordPython programming
0 Stemmen
3 AntwoordenMistake Pls Help 🥺
-1 Stem
2 AntwoordenPython Method Not Returning
4 Stemmen
7 Antwoordendef 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 Stemmen
7 Antwoordenhow
0 Stemmen
3 AntwoordenInvalid syntax
1 Stem
2 Antwoordendef 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 Stemmen
2 Antwoordenfunction problem
0 Stemmen
1 AntwoordMissing code
0 Stemmen
3 AntwoordenButton Command in tkinter PYTHON
0 Stemmen
2 AntwoordenBasic python difficulty
0 Stemmen
1 Antwoorddef 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 Stemmen
2 AntwoordenSimple code issue
1 Stem
1 AntwoordPopulair vandaag
Coding for Cybersecurity
1 Votes
Need help
1 Votes
Pointers in c#
1 Votes
Decorators in python.
2 Votes
Please click me
0 Votes
Salut tout le monde
1 Votes
How can i isntall modules
1 Votes