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 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257
| ########################
### PROGRAMME PROFIL ###
########################
#IMPORTATION DE LA FONCTION EASYGUI
import easygui as eg
#DEFINITION DES QUESTIONS
class profil:
def __init__(self):
self.prenom=""
self.Numero=-1
def setprenom(self,p):
self.prenom = p
def getprenom(self):
return self.prenom
def getNumero(self):
return self.Numero
def calculNumeroprenom(self):
somme=0
for l in self.prenom:
somme += (ord(l)-96)%10
c = somme/100
d = (somme - c*100)/10
u = (somme - c*100 - d*10)
while((c!=0) or (d!=0)):
somme = c + d + u
c = somme/100
d = (somme - c*100)/10
u = (somme - c*100 - d*10)
self.Numero = u
#CREATION BOX PRENOM
msg = "Quel est votre prenom ? :"
title = "Votre profil"
fieldNames1 = ["prenom"]
prenom = [] # Le champ a une valeur nulle
prenom = str(eg.multenterbox(msg,title,fieldNames1))
print (prenom)
#CALCUL CODE PRENOM
p=profil()
p.setprenom(prenom)
p.calculNumeroprenom()
print p.getNumero()
#CREATION BOX AGE
msg = "Quel est votre age ? :"
title = "Votre profil"
fieldNames2 = ["age"]
age = [] # Le champ a une valeur nulle
age = eg.multenterbox(msg,title,fieldNames2)
print (age)
#GENRE
genre=str(eg.buttonbox(["Quel est votre sexe ?"], choices=["homme","femme"]))
if genre == "homme":
genre =1
else:
genre =2
print (genre)
#TAILLE
taille=str(eg.buttonbox(["Votre taille est comprise entre :"], choices=["<1.50m","1.50m et 1.60m","1.61m et 1.70m","1.71m et 1.80m","1.81m et 1.90m","1.91m et 2m","2.01m et 2.10m",">2.10m"]))
if taille == "<1.50m":
taille = 0
if taille == "1.50m et 1.60m":
taille = 1
if taille == "1.61m et 1.70m":
taille = 2
if taille == "1.71m et 1.80m":
taille = 3
if taille == "1.81m et 1.90m":
taille = 4
if taille == "1.91m et 2m":
taille = 5
if taille == "2.01m et 2.10m":
taille = 6
if taille == ">2.10m":
taille = 7
print (taille)
#COULEUR DE VOS CHEUVEUX
ccheveux=str(eg.buttonbox(["Quelle est la couleur de vos cheuveux ?"], choices=["chauve","noir","brun","auburn","chatain","roux","blond","blanc"]))
if ccheveux == "chauve":
ccheveux = 0
if ccheveux == "noir":
ccheveux = 1
if ccheveux == "brun":
ccheveux = 2
if ccheveux == "auburn":
ccheveux = 3
if ccheveux == "chatain":
ccheveux = 4
if ccheveux == "roux":
ccheveux = 5
if ccheveux == "blond":
ccheveux = 6
if ccheveux == "blanc":
ccheveux = 7
print (ccheveux)
#COULEUR DE VOS YEUX
cyeux=str(eg.buttonbox(["Quelle est la couleur de vos yeux ?"], choices=["bleu","noir","gris","vert","marron","aveugle","marron clair","bleu clair"]))
if cyeux == "bleu":
cyeux = 0
if cyeux == "noir":
cyeux = 1
if cyeux == "gris":
cyeux = 2
if cyeux == "vert":
cyeux = 3
if cyeux == "marron":
cyeux = 4
if cyeux == "aveugle":
cyeux = 5
if cyeux == "marron clair":
cyeux = 6
if cyeux == "bleu clair":
cyeux = 7
print(cyeux)
#SIGNE ASTROLOGIQUE
signe=str(eg.buttonbox(["Quel est votre signe astrologique ?"], choices=["belier","taureau","gemeau","cancer","lion","vierge","balance","scorpion","sagittaire","capricorne","verseau","poisson"]))
if signe == "belier":
signe = 0
if signe == "taureau":
signe = 1
if signe == "gemeau":
signe = 2
if signe == "cancer":
signe = 3
if signe == "lion":
signe = 4
if signe == "vierge":
signe = 5
if signe == "balance":
signe = 6
if signe == "scorpion":
signe = 7
if signe == "sagittaire":
signe = 8
if signe == "capricorne":
signe = 9
if signe == "verseau":
signe = 10
if signe == "poisson":
signe = 11
eg.msgbox("Pour les questions suivantes, vous repondrez de 0, le plus faible a 9, le plus fort :")
#Q1
q1=str(eg.buttonbox(["A quelle frequence pratiquez-vous le sport ?"], choices=["0","1","2","3","4","5","6","7","8","9"]))
#Q2
q2=str(eg.buttonbox(["A quelle frequence fumez-vous ?"], choices=["0","1","2","3","4","5","6","7","8","9"]))
#Q3
q3=str(eg.buttonbox(["A quelle frequence buvez-vous ?"], choices=["0","1","2","3","4","5","6","7","8","9"]))
#Q4
q4=str(eg.buttonbox(["A quelle frequence voyagez-vous ?"], choices=["0","1","2","3","4","5","6","7","8","9"]))
#Q5
q5=str(eg.buttonbox(["Combien d'enfants avez-vous ?"], choices=["0","1","2","3","4","5","6","7","8","9"]))
#Q6
q6=str(eg.buttonbox(["A quelle frequence lisez-vous ?"], choices=["0","1","2","3","4","5","6","7","8","9"]))
#Q7
q7=str(eg.buttonbox(["Quels sont vos rapports avec votre famille ?"], choices=["0","1","2","3","4","5","6","7","8","9"]))
#Q8
q8=str(eg.buttonbox(["Quels sont vos rapports avec vos animaux ?"], choices=["0","1","2","3","4","5","6","7","8","9"]))
#Q9
q9=str(eg.buttonbox(["Quelle duree de relation recherchez-vous ? / 0 etant pour une nuit et 9 etant pour la vie"], choices=["0","1","2","3","4","5","6","7","8","9"]))
#Q10
q10=str(eg.buttonbox(["A quel point etes-vous ouvert d'esprit ?"], choices=["0","1","2","3","4","5","6","7","8","9"]))
eg.msgbox("Dites en plus sur votre partenaire ideal(e)...")
#CREATION BOX AGE PARTENAIRE
msg = "Quel serait l'age de votre partenaire ideal(e) ? :"
title = "Le profil de votre partenaire"
fieldNames2 = ["age"]
agepart = [] # Le champ a une valeur nulle
agepart = eg.multenterbox(msg,title,fieldNames2)
#GENRE PARTENAIRE
genrepart=str(eg.buttonbox(["Quel est le sexe de votre partenaire?"], choices=["homme","femme"]))
if genrepart == "homme":
genrepart =1
else:
genrepart =2
#TAILLE PARTENAIRE
taillepart=str(eg.buttonbox(["Quelle serait sa taille ideale ? :"], choices=["<1.50m","1.50m et 1.60m","1.61m et 1.70m","1.71m et 1.80m","1.81m et 1.90m","1.91m et 2m","2.01m et 2.10m",">2.10m"]))
if taillepart == "<1.50m":
taillepart = 0
if taillepart == "1.50m et 1.60m":
taillepart = 1
if taillepart == "1.61m et 1.70m":
taillepart = 2
if taillepart == "1.71m et 1.80m":
taillepart = 3
if taillepart == "1.81m et 1.90m":
taillepart = 4
if taillepart == "1.91m et 2m":
taillepart = 5
if taillepart == "2.01m et 2.10m":
taillepart = 6
if taillepart == ">2.10m":
taillepart = 7
#COULEUR CHEUVEUX PARTENAIRE
ccheveuxpart=str(eg.buttonbox(["Quelle serait sa couleur de cheveux ?"], choices=["chauve","noir","brun","auburn","chatain","roux","blond","blanc"]))
if ccheveuxpart == "chauve":
ccheveuxpart = 0
if ccheveuxpart == "noir":
ccheveuxpart = 1
if ccheveuxpart == "brun":
ccheveuxpart = 2
if ccheveuxpart == "auburn":
ccheveuxpart = 3
if ccheveuxpart == "chatain":
ccheveuxpart = 4
if ccheveuxpart == "roux":
ccheveuxpart = 5
if ccheveuxpart == "blond":
ccheveuxpart = 6
if ccheveuxpart == "blanc":
ccheveuxpart = 7
#COULEUR DE VOS YEUX PARTENAIRE
cyeuxpart=str(eg.buttonbox(["Quelle serait la couleur de ses yeux ?"], choices=["bleu","noir","gris","vert","marron","aveugle","marron clair","bleu clair"]))
if cyeuxpart == "bleu":
cyeuxpart = 0
if cyeuxpart == "noir":
cyeuxpart = 1
if cyeuxpart == "gris":
cyeuxpart = 2
if cyeuxpart == "vert":
cyeuxpart = 3
if cyeuxpart == "marron":
cyeuxpart = 4
if cyeuxpart == "aveugle":
cyeuxpart = 5
if cyeuxpart == "marron clair":
cyeuxpart = 6
if cyeuxpart == "bleu clair":
cyeuxpart = 7 |
Partager