← Back to challenges

Verbed Nouns

PythonHardstringslanguage_fundamentalsregex

Instructions

Create a function that ends the first word of a phrase with "ed", essentially verbifying a noun.

Examples

verbify("cheese burger") ➞ "cheesed burger"

verbify("salt water") ➞ "salted water"

verbify("orange juice") ➞ "oranged juice"

verbify("shredded cheese") ➞ "shredded cheese"

Notes

  • Change only the first word.
  • Note that some words may already end in "e" or "ed".
  • All phrases will be in lowercase.
python3
Loading editor…
to run
Walks through the solution with reasoning and edge cases.
Next: Apocalyptic Numbers