CJCoding With Joseph
15free / daySign inCreate account

Ends With A Suffix

Read a word and a suffix and print exactly Yes when the word ends with the suffix and No otherwise, without a string method: the tail to compare starts at len(word) - len(suffix), so slice from there to the end and test it with ==. Input: two lines, the word then the suffix, no prompts.

Expected Output:

Yes

= newline. The output ends with a newline — print one after the last line.

Hints3 available
Topics:
StringsSlicing
📥 Auto-Input:
walking\ning\n
This input is automatically fed to your program's stdin
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Ctrl+Space to expand shortcuts (pr, inp, def)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.