Files
cours/magic_square/td_carre_magique.py
2024-11-23 13:38:17 +01:00

28 lines
479 B
Python

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
if __name__ == '__main__':
carre1=[[4, 9, 2],\
[3, 5, 7],\
[8, 1, 6]]
carre2=[[16, 9, 14],\
[11, 13, 15],\
[12, 17, 10]]
carre3=[[1, 2, 3],\
[4, 5, 6],\
[7, 8, 9]]
carre4=[[16, 3, 2, 13],\
[5, 10, 11, 8],\
[9, 6, 7, 12],\
[4, 15, 14, 1]]
carre5=[[1, 14, 14, 4],\
[11, 7, 6, 9],\
[8, 10, 10, 5],\
[13, 2, 3, 15]]