diff --git a/TDO4/code/load.py b/TDO4/code/load.py new file mode 100644 index 0000000000000000000000000000000000000000..8fb2364df20b3361ce6d7c8c781ed9c9314c0416 --- /dev/null +++ b/TDO4/code/load.py @@ -0,0 +1,14 @@ +labyrinthe = [[0, 0, 0, 0, 1, 0, 0, 0, 0, 0], + [0, 0, 0, 0, 1, 0, 0, 0, 0, 0], + [0, 0, 0, 0, 1, 0, 0, 0, 0, 0], + [0, 0, 0, 0, 1, 0, 0, 0, 0, 0], + [0, 0, 0, 0, 1, 0, 0, 0, 0, 0], + [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [0, 0, 0, 0, 1, 0, 0, 0, 0, 0], + [0, 0, 0, 0, 1, 0, 0, 0, 0, 0], + [0, 0, 0, 0, 1, 0, 0, 0, 0, 0], + [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]] + +def affiche_labyrinthe(l): + print('\n'.join([''.join(['{:4}'.format(item) for item in row]) + for row in l])) \ No newline at end of file diff --git a/TDO4/code/priorite.py b/TDO4/code/priorite.py new file mode 100644 index 0000000000000000000000000000000000000000..1299edc5214f3a4a6098b99c233e94c570f9369e --- /dev/null +++ b/TDO4/code/priorite.py @@ -0,0 +1,8 @@ +from queue import PriorityQueue + +file_prio = PriorityQueue() +file_prio.put((2, "Bob")) +file_prio.put((1, "Alice")) + +while not file_prio.empty(): + print(file_prio.get()) \ No newline at end of file diff --git a/TDO4/td4.pdf b/TDO4/td4.pdf new file mode 100644 index 0000000000000000000000000000000000000000..3cec103f87fda490f4e4bf5dc961868df4b7b94d Binary files /dev/null and b/TDO4/td4.pdf differ