ends_ly

Given a string, return true if it ends in “ly”.

This exercise was taken from codingbat.com and has been adapted for the Python language. There are many great programming exercises there, but the majority are created for Java.

Test 1

Input:

'oddly'

Output:

True

Test 2

Input:

'y'

Output:

False

Test 3

Input:

'oddy'

Output:

False

Test 4

Input:

'oddl'

Output:

False

Test 5

Input:

'olydd'

Output:

False

Test 6

Input:

'ly'

Output:

True

Test 7

Input:

''

Output:

False

Test 8

Input:

'falsey'

Output:

False

Test 9

Input:

'evenly'

Output:

True