From 1eb234eb166a7b6ef25653338bf0d0b1a394a7ac Mon Sep 17 00:00:00 2001 From: Leo Litaize <litaizeleo40@gmail.com> Date: Fri, 10 Jan 2025 14:24:40 +0100 Subject: [PATCH] Question 4 ?? --- main.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/main.py b/main.py index 43cc044..2961506 100644 --- a/main.py +++ b/main.py @@ -24,6 +24,17 @@ class TabletteChocolat: #help(itertools.chain) ?????? + def est_possible(self, i, j): + for a in list(g): + if a==(i,j): + return "Ce coup est possible" + else: + return "Ce coup n est pas possible" + + + + + t=TabletteChocolat(3,4) print(t) TabletteChocolat(4,3) -- GitLab