1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
| def pluriel(mot):
ou = 'hibou chou genou caillou pou bijou'.split()
eu = 'pneu bleu emeu'.split()
au = 'landau sarrau'.split()
al = 'banal fatal naval natal bancal bal festival chacal carnaval cal serval'.split()
ail= 'bail corail émail soupirail travail ventail vitrail'.split()
if mot in ou : return mot + 'x'
elif mot in eu: return mot + 's'
elif mot in au : return mot + 's'
elif mot[-2:] == 'au': return mot + 'ux'
elif mot in al : return mot + 's'
elif mot[-2:] == 'al' : return mot[: -1] + 'ux'
elif mot in ail : return mot[ : -2] + 'ux'
elif mot [-1:] == 'x' or 's' or 'z' : return mot
elif mot == 'oeil' : return 'yeux'
else : return mot + 's'
>>> pluriel('natal')
'natals'
>>> pluriel('journal')
'journaux'
>>> pluriel('prix')
'prix'
>>> pluriel('tomate')
'tomate'
>>> |