4 nouveaux défis

This commit is contained in:
2022-10-09 22:21:01 +02:00
parent 3b054d370c
commit 34b88066f0
4 changed files with 86 additions and 0 deletions

13
Les dragées surprises.py Normal file
View File

@@ -0,0 +1,13 @@
dragees = ["A", "B", "E", "C", "G", "F", "M", "O", "H", "P", "S", "V"]
ctr = 0
while True:
ctr += 1
idx1 = (ctr * 5) % 12
idx0 = idx1-1 if idx1>0 else 11
dragees[idx0-1], dragees[idx1-1] = dragees[idx1-1], dragees[idx0-1]
if "A" in dragees[0:4] and "E" in dragees[0:4] and "G" in dragees[0:4] and "H" in dragees[0:4]:
break
print(ctr)
print(dragees)