Advertisement
Guest User

Untitled

a guest
Jul 7th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # coding: utf-8
  2. IMPORT RANDOM
  3. X = ['marcassin', 'disquette', 'macbook', 'cartouche', 'magnum', 'revolver', 'asiatique', 'eventail', 'illisible', 'intelligent', 'exigeant', 'atroce']
  4. mat = RANDOM.choice(X)
  5. faux, vrai = [], []
  6. VAR = raw_input('Choisissez une lettre : ')
  7.     IF VAR.isalpha() AND len(VAR) != 1:
  8.         print 'Je vous ai demandé de choisis UNE LETTRE.'
  9.     VAR = raw_input('Choisissez une lettre : ')
  10. IF VAR in mat:
  11.     vrai.append(VAR)
  12. ELSE:
  13.     faux.append(VAR)
  14. print ' '.join(lettre in vrai AND lettre OR '_' FOR lettre in mat)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement