8000 Changed wallis to computepi for better description (#219) · FZCJ/pyscript@843b9d0 · GitHub
[go: up one dir, main page]

8000 Skip to content

Commit 843b9d0

Browse files
authored
Changed wallis to computepi for better description (pyscript#219)
import this?
1 parent a0c7b76 commit 843b9d0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

GETTING-STARTED.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,13 @@ example, we can compute π.
5757
<body>
5858
<py-script>
5959
print("Let's compute π:")
60-
def wallis(n):
60+
def compute_pi(n):
6161
pi = 2
6262
for i in range(1,n):
6363
pi *= 4 * i ** 2 / (4 * i ** 2 - 1)
6464
return pi
6565

66-
pi = wallis(100000)
66+
pi = compute_pi(100000)
6767
s = f"π is approximately {pi:.3f}"
6868
print(s)
6969
</py-script>
@@ -97,13 +97,13 @@ the `<py-script>` tag write to.
9797
import datetime as dt
9898
pyscript.write('today', dt.date.today().strftime('%A %B %d, %Y'))
9999

100-
def wallis(n):
100+
def compute_pi(n):
101101
pi = 2
102102
for i in range(1,n):
103103
pi *= 4 * i ** 2 / (4 * i ** 2 - 1)
104104
return pi
105105

106-
pi = wallis(100000)
106+
pi = compute_pi(100000)
107107
pyscript.write('pi', f'π is approximately {pi:.3f}')
108108
</py-script>
109109
</body>

0 commit comments

Comments
 (0)
0