Last active
December 18, 2020 16:08
-
-
Save Alexpeain/cda29f7df3f43579f679e6910ed6b2d5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For each word in words, add ‘d’ to the end of the word if the word ends in “e” to make it past tense. | |
Otherwise, add ‘ed’ to make it past tense. Save these past tense words to a list called past_tense. | |
words = ["adopt", "bake", "beam", "confide", "grill", "plant", "time", "wave", "wish"] | |
past_tense = 0 | |
for i in words: | |
if i in ['bake','confide','time','wave']: | |
past_tense = i + "d" | |
else: | |
past_tense = i + "ed" | |
print(past_tense) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment