Spaces:
Running
Running
Rename notebooks/testable.py to notebooks/multiplier.py
Browse files
notebooks/{testable.py → multiplier.py}
RENAMED
@@ -6,14 +6,24 @@ app = marimo.App(width="medium")
|
|
6 |
|
7 |
@app.cell
|
8 |
def _():
|
9 |
-
|
10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
|
12 |
|
13 |
@app.cell
|
14 |
-
def add(
|
15 |
-
z = x
|
16 |
-
z
|
17 |
return
|
18 |
|
19 |
|
|
|
6 |
|
7 |
@app.cell
|
8 |
def _():
|
9 |
+
import marimo as mo
|
10 |
+
|
11 |
+
ui = mo.md(
|
12 |
+
'''
|
13 |
+
- What's x?: {x}
|
14 |
+
- How many times?: {y}
|
15 |
+
'''
|
16 |
+
).batch(
|
17 |
+
x=mo.ui.slider(start=1, stop=10, value=3, include_input=True),
|
18 |
+
y=mo.ui.slider(start=1, stop=10, value=3, include_input=True)
|
19 |
+
)
|
20 |
+
return (ui,)
|
21 |
|
22 |
|
23 |
@app.cell
|
24 |
+
def add(ui):
|
25 |
+
z = ui["x"].value * ui["y"].value
|
26 |
+
ui, z
|
27 |
return
|
28 |
|
29 |
|