Skip to content

Commit

Permalink
Update index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
HikaGenji authored May 29, 2024
1 parent 7f8e244 commit 5331e1d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,14 @@ <h1>Loading...</h1>
</nav>

<section class="pyscript">
Hello world! <br />
we define a function f as
we define a function f as <br />
def f(l):
return {'median': statistics.median(l), 'range': l.max()-l.min()}
<script type="py">
from pyscript import display
import statistics
def f(l):
return {'median': statistics.median(l), 'range': l.max()-l.min()}
return {'median': statistics.median(l), 'range': max(l)-min(l)}
x = [2, 2, 2, 3, 3, 5, 5, 6, 6, 6, 7, 7]
display("x=")
display(x)
Expand Down

0 comments on commit 5331e1d

Please sign in to comment.