CoddityTeam / movaicode

Concours mensuel du Pire Développeur de France
122 stars 10 forks source link

monostring.py (movaicode/18) #279

Open chickentuna opened 1 year ago

chickentuna commented 1 year ago

Honetement je ne vois pas le pb

# Demander la date
date = input('entrer date de néssance (DD/MM/YYYY ou DD/MM)> ')
date_d = int(date.split('/')[0])
date_m = int(date.split('/')[1])

# Convertir la date en indice de signe
date_i = 0 if date_m == 3 and date_d >= 21 or date_m == 4 and date_d <= 20 else 1 if date_m == 4 and date_d >= 21 or date_m == 5 and date_d <= 20 else 2 if date_m == 5 and date_d >= 21 or date_m == 6 and date_d <= 21 else 3 if date_m == 6 and date_d >= 22 or date_m == 7 and date_d <= 22 else 4 if date_m == 7 and date_d >= 23 or date_m == 8 and date_d <= 22 else 5 if date_m == 8 and date_d >= 23 or date_m == 9 and date_d <= 22 else 6 if date_m == 9 and date_d >= 23 or date_m == 10 and date_d <= 22 else 7 if date_m == 10 and date_d >= 23 or date_m == 11 and date_d <= 22 else 8 if date_m == 11 and date_d >= 23 or date_m == 12 and date_d <= 21 else 9 if date_m == 12 and date_d >= 22 or date_m == 1 and date_d <= 21 else 10 if date_m == 1 and date_d >= 21 or date_m == 2 and date_d <= 18 else 11

# Convertir l'indice de signe en signe
print('BTGCLVBSSCVPéaéaiiacaaeolumnoelogpriirecnrarirsseeae_gnptiesrauryecitcaoduxkpéeoaounmerdeàonirbordeldechrnputainwtfkeek!'[date_i:date_i+[6, 7, 7, 6, 4, 6, 7, 8, 10, 10, 7, 7][date_i]*12:12])