Coding exercise 38
This commit is contained in:
parent
86c7332cd4
commit
c08bf087c3
@ -1,4 +1,4 @@
|
||||
def positive(numbers):
|
||||
return([positive if positive > 0 else 0 for positive in numbers])
|
||||
def nostrings(jumble):
|
||||
return([number if type(number) == int else 0 for number in jumble])
|
||||
|
||||
print(positive([-5, 3, -1, 101]))
|
||||
print(nostrings([99, 'no data', 95, 94, 'no data']))
|
Loading…
Reference in New Issue
Block a user