پرش به محتوا

Z13091: نوسخه‌لر آراسینداکی فرق

Wikifunctions سایتیندان
return form in lower case
Replace multiple conditional returns with a single final return
خط ۱۴: خط ۱۴:
"Z61K1": "python"
"Z61K1": "python"
},
},
"Z16K2": "def Z13087(Z13087K1):\n\timport re\n\tlemma = Z13087K1.lower()\n\tif lemma.endswith('c') \\\n\t\t\tand re.search(r'[aeiou]c$', lemma):\n\t\treturn lemma + 'k' + 'ing'\n\tif re.search(r'[aeiou][bdfgkmnprstvz]$', lemma) \\\n\t\t\tand not re.search(r'[aeiou][aeiou][bdfgkmnprstvz]$', lemma):\n\t\treturn lemma + lemma[-1] + 'ing'\n\tif lemma.endswith('ie') :\n\t\treturn lemma[:-2] + 'ying'\n\tif lemma.endswith('e') \\\n\t\t\tand not re.search(r'[eioy]e$', lemma):\n\t\treturn lemma[:-1]+ 'ing'\n\treturn lemma + 'ing'"
"Z16K2": "def Z13087(Z13087K1):\n\timport re\n\tlemma = Z13087K1.lower()\n\tform = lemma + 'ing'\n\tif lemma.endswith('c') \\\n\t\t\tand re.search(r'[aeiou]c$', lemma):\n\t\tform = lemma + 'k' + 'ing'\n\tif re.search(r'[aeiou][bdfgkmnprstvz]$', lemma) \\\n\t\t\tand not re.search(r'[aeiou][aeiou][bdfgkmnprstvz]$', lemma):\n\t\tform = lemma + lemma[-1] + 'ing'\n\tif lemma.endswith('ie') :\n\t\tform = lemma[:-2] + 'ying'\n\tif lemma.endswith('e') \\\n\t\t\tand not re.search(r'[eioy]e$', lemma):\n\t\tform = lemma[:-1]+ 'ing'\n\treturn form"
}
}
},
},

‏۱۶ فوریه ۲۰۲۴، ساعت ۱۱:۱۴ نوسخه‌سی

This page displays in a limited way without JavaScript.