Skip to content
CodeItRaw
Code Reading
/
All Positive?
Path
Play
Daily
Leaderboard
tr
Break the Code
All Positive?
Write a list for which this function gives the wrong answer.
1
def
all_positive
(values):
2
if
len
(values) ==
0
:
3
return
False
4
for
v
in
values:
5
if
v <=
0
:
6
return
False
7
return
True