From 5a064c903197ccc80390b0d7db798c7769008525 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?No=C3=A9=20GARNIER?= Date: Mon, 5 Dec 2022 10:59:34 +0100 Subject: [PATCH 1/2] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.gitignore'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 3e123ef6..a6967c98 100644 --- a/.gitignore +++ b/.gitignore @@ -16,4 +16,4 @@ /.idea -# *.db \ No newline at end of file +*.db \ No newline at end of file From 1fd508a3e22ba15d2b65efdba86615aaae3ec1b2 Mon Sep 17 00:00:00 2001 From: Pierre BALLANDRAS Date: Mon, 5 Dec 2022 11:54:19 +0100 Subject: [PATCH 2/2] Enigme de base print + var --- EnigmePython/Multi/ASCII.py | 1 + EnigmePython/Solo/premiere.py | 14 ++++++++++++++ WEB/View/src/JS/Affiche.js | 12 ++++++++++++ WEB/View/src/JS/Variable.js | 10 ++++++++++ 4 files changed, 37 insertions(+) create mode 100644 EnigmePython/Multi/ASCII.py create mode 100644 EnigmePython/Solo/premiere.py create mode 100644 WEB/View/src/JS/Affiche.js create mode 100644 WEB/View/src/JS/Variable.js diff --git a/EnigmePython/Multi/ASCII.py b/EnigmePython/Multi/ASCII.py new file mode 100644 index 00000000..053ed9b3 --- /dev/null +++ b/EnigmePython/Multi/ASCII.py @@ -0,0 +1 @@ +def ascii() \ No newline at end of file diff --git a/EnigmePython/Solo/premiere.py b/EnigmePython/Solo/premiere.py new file mode 100644 index 00000000..da3a2bfe --- /dev/null +++ b/EnigmePython/Solo/premiere.py @@ -0,0 +1,14 @@ +# Affiche Hello world ! + +print("Hello World !") + +# Declaration de variable + +num = 1 +string = "Oi" +liste=[num,string] + +print(liste) + + +# Utilisation de fonction \ No newline at end of file diff --git a/WEB/View/src/JS/Affiche.js b/WEB/View/src/JS/Affiche.js new file mode 100644 index 00000000..15a53b9e --- /dev/null +++ b/WEB/View/src/JS/Affiche.js @@ -0,0 +1,12 @@ +//~ Function that test the user code + +async function submit(){ + var test = editor.getValue(); + exec("print('Hello World !')", "code"); + exec(test, "solution"); + result.innerHTML = "Test en cours..."; + await new Promise(r => setTimeout(r, 1500)); + check(); + } + + \ No newline at end of file diff --git a/WEB/View/src/JS/Variable.js b/WEB/View/src/JS/Variable.js new file mode 100644 index 00000000..9dd0185c --- /dev/null +++ b/WEB/View/src/JS/Variable.js @@ -0,0 +1,10 @@ +async function submit(){ + var test = editor.getValue(); + exec("print([1,'Oui'])", "code"); + exec(test, "solution"); + result.innerHTML = "Test en cours..."; + await new Promise(r => setTimeout(r, 1500)); + check(); + } + + \ No newline at end of file