This commit is contained in:
Jean-Marie 'Histausse' Mineau 2026-05-31 16:11:55 +02:00
parent 38a192abb6
commit 7e8ee9d17e
Signed by: histausse
GPG key ID: B66AEEDA9B645AD2
3 changed files with 68 additions and 8 deletions

View file

@ -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