[WASM] Changed the demo to fibonacci calculation

This commit is contained in:
Shing Lyu committed 2018-12-09 21:35:23 +01:00
1 parent 3e231620cd
commit b2aa7ac2fb
1 file changed
+12 -4
+12 -4
View File
@@ -29,10 +29,18 @@
<h1>RustPython Demo</h1>
<p>RustPython is a Python interpreter writter in Rust. This demo is compiled from Rust to WebAssembly so it runs in the browser</p>
<p>Please input your python code below and click <kbd>Run</kbd>:</p>
<textarea id="code">x = 1
y = 2
print('Hello! x + y equals to ' + str(x+y))
</textarea>
<textarea id="code">n1 = 0
n2 = 1
count = 0
until = 10
print("These are the first " + str(until) + " number in a Fibonacci sequence:")
while count < until:
print(n1)
n1, n2 = n2, n1 + n2
count += 1
</textarea>
<button id="run-btn">Run &#9655;</button>
<script src="./bootstrap.js"></script>
<h3>Standard Output</h3>