-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
34 lines (32 loc) · 832 Bytes
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<html>
<script type="text/javascript">
function updateValue() {
var jsonrequest = document.getElementById('jsonrequest')
var solution = document.getElementById('solution')
var tests = document.getElementById('tests')
var obj = {solution: solution.value, tests: tests.value}
jsonrequest.value = JSON.stringify(obj)
}
</script>
<body>
<h2>Python verifier</h2>
<br>
Solution code:<br>
<textarea id="solution" rows="10" cols="80">number = 2
wizard = 'Oz'
def addOne(x):
return x+1</textarea>
<br>
Tests:<br>
<textarea id="tests" rows="10" cols="80">>>> number
2
>>> wizard
'Oz'
>>> addOne(2)
3</textarea>
<form action="/verify" method="POST">
<input type="hidden" name="jsonrequest" id="jsonrequest"/>
<input type="submit" onclick="updateValue()"></input>
</form>
</body>
</html>