New to Python, I've searched hard for this solution. This is for a school project.
The problem Write this function:
def is_ascending(items):
To determine whether the sequence of items is strictly ascending so that each element is strictly larger (not just merely equal to) than the element that precedes it. Return True
if the list of items is strictly ascending, and return False
otherwise.
Note that the empty sequence is considered ascending, as is also every one-element sequence, so be careful that your function returns the correct answers in these seemingly insigni5icant edge cases of this problem. (If these sequences were not ascending, pray tell, what would be the two elements that violate the requirement and make that particular sequence not be ascending?)
I can't seem to make it work, here's my code: