From 1fd508a3e22ba15d2b65efdba86615aaae3ec1b2 Mon Sep 17 00:00:00 2001 From: Pierre BALLANDRAS Date: Mon, 5 Dec 2022 11:54:19 +0100 Subject: [PATCH] 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