Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
55 lines (50 loc) · 2.33 KB
/
Copy pathindex.html
File metadata and controls
55 lines (50 loc) · 2.33 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Python by Example</title>
<meta name="description" content="Learn Python in your browser with ten interactive Pyodide examples.">
<link rel="stylesheet" href="css/style.css">
<script src="https://cdn.jsdelivr.net/pyodide/v0.23.4/full/pyodide.js"></script>
</head>
<body>
<main class="app-shell">
<header class="hero">
<p class="eyebrow">Python by Example</p>
<h1>Learn Python by running one small program at a time.</h1>
<p class="intro">Ten beginner-friendly examples run directly in your browser with Pyodide. No Python installation required.</p>
<p class="privacy-note">Your code runs locally in this page. Do not paste passwords, API keys, or private code.</p>
</header>
<section class="lesson-card" aria-labelledby="lesson-title">
<div class="lesson-header">
<div>
<p class="lesson-count" id="lesson-count">Example 1 of 10</p>
<h2 id="lesson-title">Loading examples…</h2>
</div>
<span class="runtime-status" id="runtime-status" role="status">Loading Python…</span>
</div>
<div class="progress-track" aria-hidden="true"><span id="progress-bar"></span></div>
<p class="lesson-description" id="lesson-description"></p>
<label for="code">Edit the example if you like:</label>
<textarea id="code" spellcheck="false" aria-describedby="lesson-description"></textarea>
<div class="actions">
<button id="run" type="button" disabled>Run Code</button>
<button id="next" class="secondary" type="button" disabled>Next Example →</button>
<button id="previous" class="secondary subtle" type="button" disabled>← Previous</button>
</div>
<div class="output-heading">
<h3>Output</h3>
<button id="reset" class="text-button" type="button">Reset example</button>
</div>
<pre id="output" aria-live="polite">Loading Python runtime…</pre>
</section>
<footer>
<a href="https://github.com/saurabhahuja71/python-by-example">View the source on GitHub</a>
<span aria-hidden="true">·</span>
<a href="https://pyodide.org/">Learn about Pyodide</a>
</footer>
</main>
<script src="css/js/runner.js"></script>
</body>
</html>