Z13091: Difference between revisions

From Wikifunctions
restructure conditions so all tests pass
extend -ee -ie rule to -oe and -ye
Line 14: Line 14:
"Z61K1": "python"
"Z61K1": "python"
},
},
"Z16K2": "def Z13087(Z13087K1):\n\timport re\n\tif Z13087K1.endswith('c') \\\n\t\t\tand re.search(r'[aeiou]c$', Z13087K1):\n\t\treturn Z13087K1 + 'k' + 'ing'\n\tif re.search(r'[aeiou][bdfgkmnprstvz]$', Z13087K1) \\\n\t\t\tand not re.search(r'[aeiou][aeiou][bdfgkmnprstvz]$', Z13087K1):\n\t\treturn Z13087K1 + Z13087K1[-1] + 'ing'\n\tif Z13087K1.endswith('ie') :\n\t\treturn Z13087K1[:-2] + 'ying'\n\tif Z13087K1.endswith('e') \\\n\t\t\tand not re.search(r'[ei]e$', Z13087K1):\n\t\treturn Z13087K1[:-1]+ 'ing'\n\treturn Z13087K1 + 'ing'"
"Z16K2": "def Z13087(Z13087K1):\n\timport re\n\tif Z13087K1.endswith('c') \\\n\t\t\tand re.search(r'[aeiou]c$', Z13087K1):\n\t\treturn Z13087K1 + 'k' + 'ing'\n\tif re.search(r'[aeiou][bdfgkmnprstvz]$', Z13087K1) \\\n\t\t\tand not re.search(r'[aeiou][aeiou][bdfgkmnprstvz]$', Z13087K1):\n\t\treturn Z13087K1 + Z13087K1[-1] + 'ing'\n\tif Z13087K1.endswith('ie') :\n\t\treturn Z13087K1[:-2] + 'ying'\n\tif Z13087K1.endswith('e') \\\n\t\t\tand not re.search(r'[eioy]e$', Z13087K1):\n\t\treturn Z13087K1[:-1]+ 'ing'\n\treturn Z13087K1 + 'ing'"
}
}
},
},

Revision as of 00:13, 15 February 2024

This page displays in a limited way without JavaScript.