Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! /usr/bin/env python
- # -*- coding: utf-8 -*-
- #Maynier Mathurin
- #px21-2
- print 'DEBUT DE TEST'
- from Tkinter import *
- ail = 'bail corail émail fermail soupirail travail vantail vitrail'.split()
- al = 'final cheval journal canal'.split()
- au = 'landau sarrau'.split()
- eau = 'seau cadeau rideau beau oiseau corbeau'.split()
- eu = 'pneu bleu emeu'.split()
- ou = 'bijou hibou chou genou caillou pou ripou '.split()
- def pluriel(mot):
- if mot[-1] is 's' : return mot
- if mot == 'ail': return 'aulx'
- if mot in ail : return mot[:-2] + 'ux'
- if mot in al : return mot[:-1] + 'ux'
- if mot in ou : return mot + 'x'
- if mot[-1] is 'x' : return mot
- if mot[-1] is 'z' : return mot
- if mot in eau : return mot + 'x'
- if mot == 'oeil' : return 'yeux'
- if mot == 'ciel' : return 'cieux'
- return mot + 's'
- def valeur(event) : val.configure(text=eval(express.get()))
- top = Tk()
- express = Entry(top)
- express.bind("<Return>", valeur)
- express.pack()
- val = Label(top)
- val.pack()
- top.mainloop()
- print 'FIN DE TEST'
Add Comment
Please, Sign In to add comment