add repl
This commit is contained in:
parent
38a192abb6
commit
7e8ee9d17e
3 changed files with 68 additions and 8 deletions
|
|
@ -63,9 +63,10 @@
|
|||
// Pyscript:
|
||||
pyscript-headers: (
|
||||
"remote-2026.3.1": {
|
||||
html.elem("script", attrs: (src: "./mini-coi.js"))
|
||||
html.elem("script", attrs: (type: "module", src: "https://pyscript.net/releases/2026.3.1/core.js"))
|
||||
html.elem("link", attrs: (rel: "stylesheet", href: "https://pyscript.net/releases/2026.3.1/core.js"))
|
||||
}
|
||||
html.elem("link", attrs: (rel: "stylesheet", href: "https://pyscript.net/releases/2026.3.1/core.css"))
|
||||
},
|
||||
),
|
||||
pyscript-version: "remote-2026.3.1",
|
||||
)
|
||||
|
|
@ -86,6 +87,22 @@
|
|||
print(i)
|
||||
```
|
||||
]
|
||||
#pyscript(repl: true)[
|
||||
```python
|
||||
ret = []
|
||||
for i in range(16, 31):
|
||||
if i % 3 == 0 and i % 5 == 0:
|
||||
ret.append("plopliplop")
|
||||
elif i % 3 == 0:
|
||||
ret.append("plop")
|
||||
elif i % 5 == 0:
|
||||
ret.append("plip")
|
||||
else:
|
||||
ret.append(i)
|
||||
# >>> print(ret)
|
||||
# [16, 17, 'plop', 19, 'plip', 'plop', 22, 23, 'plop', 'plip', 26, 'plop', 28, 29, 'plopliplop']
|
||||
```
|
||||
]
|
||||
|
||||
#summ.card
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue