跳转到内容

Z13091:修订间差异

来自Wikifunctions
restructure conditions so all tests pass
extend -ee -ie rule to -oe and -ye
第14行: 第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'"
}
}
},
},

2024年2月15日 (四) 00:13的版本

此页面以没有JavaScript的方式显示