Past Tense
Lesson 19 of 19 in Coddy's Into the Past || Complete Beginner for Python Strings course.
Transform a word to the past tense of that word.
Challenge
EasyCreate a function which adds an "ed" to a string if it does not already end with "ed"
Example:
Input - "stay"
Expected Output - "stayed"
Input - "jumped"
Expected Output - "jumped"
You are going to build on everything you have done up until now. In that first case we added "ed" to "stay"
In the second we return the string with no additions need
Try it yourself
def past(s):
#write your code below