Define a Python function "descending(l)" that returns True if each element in its input list is at most as big as the one before it
def descending(l):
for i in range(0,len(l)-1):
if(l[i]<l[i+1]):
return False
return True
def descending(l):
for i in range(0,len(l)-1):
if(l[i]<l[i+1]):
return False
return True
No comments:
Post a Comment