Pour le moment on va s'en tenir au spam...
darcs-hash:20071109151613-c992d-4e8a215594802f1afe91d63e6d70f8c48afad28b.gz
This commit is contained in:
parent
caa26c40b1
commit
8d3c8cf7ab
1 changed files with 30 additions and 0 deletions
30
gestion/crans_nazi.py
Executable file
30
gestion/crans_nazi.py
Executable file
|
@ -0,0 +1,30 @@
|
||||||
|
#! /usr/bin/env python
|
||||||
|
# -*- coding: iso-8859-15 -*-
|
||||||
|
|
||||||
|
import random
|
||||||
|
|
||||||
|
charte_MA = "Tu n'as pas signé la [1;31mcharte des membres actifs.[0m"
|
||||||
|
|
||||||
|
def punition(motif):
|
||||||
|
""" Comment rappeler aux gens qu'ils doivent signer
|
||||||
|
la charte des membres acifs. """
|
||||||
|
print "%s" % motif
|
||||||
|
print "Pour la peine, tu vas faire un peu de calcul mental."
|
||||||
|
|
||||||
|
ok = False
|
||||||
|
while ok == False:
|
||||||
|
|
||||||
|
a = random.randint(11,99)
|
||||||
|
b = random.randint(11,99)
|
||||||
|
q = "Combien fait %(a)s + %(b)s : " % {'a' : a, 'b' : b}
|
||||||
|
r = a + b
|
||||||
|
|
||||||
|
t = input(q)
|
||||||
|
if int(t) == r:
|
||||||
|
print "bonne réponse"
|
||||||
|
ok = True
|
||||||
|
else:
|
||||||
|
print "mauvaise réponse"
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
punition(charte_MA)
|
Loading…
Add table
Add a link
Reference in a new issue