Spaces:
Runtime error
Runtime error
Upload calculus.ipynb
Browse files- calculus.ipynb +40 -19
calculus.ipynb
CHANGED
@@ -2,13 +2,13 @@
|
|
2 |
"cells": [
|
3 |
{
|
4 |
"cell_type": "code",
|
5 |
-
"execution_count":
|
6 |
-
"id": "
|
7 |
"metadata": {},
|
8 |
"outputs": [
|
9 |
{
|
10 |
"data": {
|
11 |
-
"application/mercury+json": "{\n \"widget\": \"App\",\n \"title\": \"Calculus
|
12 |
"text/html": [
|
13 |
"<h3>Mercury Application</h3><small>This output won't appear in the web app.</small>"
|
14 |
],
|
@@ -37,15 +37,25 @@
|
|
37 |
},
|
38 |
{
|
39 |
"cell_type": "code",
|
40 |
-
"execution_count":
|
41 |
-
"id": "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
"metadata": {},
|
43 |
"outputs": [
|
44 |
{
|
45 |
"data": {
|
46 |
-
"application/mercury+json": "{\n \"widget\": \"Button\",\n \"label\": \"New equation\",\n \"style\": \"primary\",\n \"value\": false,\n \"model_id\": \"
|
47 |
"application/vnd.jupyter.widget-view+json": {
|
48 |
-
"model_id": "
|
49 |
"version_major": 2,
|
50 |
"version_minor": 0
|
51 |
},
|
@@ -58,23 +68,22 @@
|
|
58 |
}
|
59 |
],
|
60 |
"source": [
|
61 |
-
"init_equations = True\n",
|
62 |
"generate = mr.Button(label=\"New equation\")"
|
63 |
]
|
64 |
},
|
65 |
{
|
66 |
"cell_type": "code",
|
67 |
-
"execution_count":
|
68 |
-
"id": "
|
69 |
"metadata": {},
|
70 |
"outputs": [
|
71 |
{
|
72 |
"data": {
|
73 |
"text/latex": [
|
74 |
-
"$\\displaystyle \\frac{d}{d
|
75 |
],
|
76 |
"text/plain": [
|
77 |
-
"Eq(Derivative((
|
78 |
]
|
79 |
},
|
80 |
"metadata": {},
|
@@ -83,10 +92,10 @@
|
|
83 |
{
|
84 |
"data": {
|
85 |
"text/latex": [
|
86 |
-
"$\\displaystyle \\int \\left(
|
87 |
],
|
88 |
"text/plain": [
|
89 |
-
"Eq(Integral(
|
90 |
]
|
91 |
},
|
92 |
"metadata": {},
|
@@ -107,10 +116,10 @@
|
|
107 |
{
|
108 |
"data": {
|
109 |
"text/latex": [
|
110 |
-
"$\\displaystyle \\frac{d}{d
|
111 |
],
|
112 |
"text/plain": [
|
113 |
-
"Eq(Derivative((
|
114 |
]
|
115 |
},
|
116 |
"metadata": {},
|
@@ -119,10 +128,10 @@
|
|
119 |
{
|
120 |
"data": {
|
121 |
"text/latex": [
|
122 |
-
"$\\displaystyle \\int \\left(
|
123 |
],
|
124 |
"text/plain": [
|
125 |
-
"Eq(Integral(
|
126 |
]
|
127 |
},
|
128 |
"metadata": {},
|
@@ -251,10 +260,22 @@
|
|
251 |
"rhs()"
|
252 |
]
|
253 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
254 |
{
|
255 |
"cell_type": "code",
|
256 |
"execution_count": null,
|
257 |
-
"id": "
|
258 |
"metadata": {},
|
259 |
"outputs": [],
|
260 |
"source": []
|
|
|
2 |
"cells": [
|
3 |
{
|
4 |
"cell_type": "code",
|
5 |
+
"execution_count": 1,
|
6 |
+
"id": "e5bdcfe3",
|
7 |
"metadata": {},
|
8 |
"outputs": [
|
9 |
{
|
10 |
"data": {
|
11 |
+
"application/mercury+json": "{\n \"widget\": \"App\",\n \"title\": \"Calculus with button\",\n \"description\": \"Generates expressions which students can apply differential and integral calculus to.\",\n \"show_code\": false,\n \"show_prompt\": false,\n \"output\": \"app\",\n \"schedule\": \"\",\n \"notify\": \"{}\",\n \"continuous_update\": true,\n \"static_notebook\": false,\n \"show_sidebar\": false,\n \"full_screen\": true,\n \"allow_download\": false,\n \"model_id\": \"mercury-app\",\n \"code_uid\": \"App.0.40.24.4-rand9623c2c5\"\n}",
|
12 |
"text/html": [
|
13 |
"<h3>Mercury Application</h3><small>This output won't appear in the web app.</small>"
|
14 |
],
|
|
|
37 |
},
|
38 |
{
|
39 |
"cell_type": "code",
|
40 |
+
"execution_count": 2,
|
41 |
+
"id": "6c291d72",
|
42 |
+
"metadata": {},
|
43 |
+
"outputs": [],
|
44 |
+
"source": [
|
45 |
+
"equation_count = 0"
|
46 |
+
]
|
47 |
+
},
|
48 |
+
{
|
49 |
+
"cell_type": "code",
|
50 |
+
"execution_count": 3,
|
51 |
+
"id": "ed0119b5",
|
52 |
"metadata": {},
|
53 |
"outputs": [
|
54 |
{
|
55 |
"data": {
|
56 |
+
"application/mercury+json": "{\n \"widget\": \"Button\",\n \"label\": \"New equation\",\n \"style\": \"primary\",\n \"value\": false,\n \"model_id\": \"d9b6141d235246f5a54aba97568bd28f\",\n \"code_uid\": \"Button.0.40.11.1-randcb9ee30c\",\n \"disabled\": false,\n \"hidden\": false\n}",
|
57 |
"application/vnd.jupyter.widget-view+json": {
|
58 |
+
"model_id": "d9b6141d235246f5a54aba97568bd28f",
|
59 |
"version_major": 2,
|
60 |
"version_minor": 0
|
61 |
},
|
|
|
68 |
}
|
69 |
],
|
70 |
"source": [
|
|
|
71 |
"generate = mr.Button(label=\"New equation\")"
|
72 |
]
|
73 |
},
|
74 |
{
|
75 |
"cell_type": "code",
|
76 |
+
"execution_count": 4,
|
77 |
+
"id": "b920c45c",
|
78 |
"metadata": {},
|
79 |
"outputs": [
|
80 |
{
|
81 |
"data": {
|
82 |
"text/latex": [
|
83 |
+
"$\\displaystyle \\frac{d}{d t} \\frac{7 t - 4}{- 6 t - 12} = ?$"
|
84 |
],
|
85 |
"text/plain": [
|
86 |
+
"Eq(Derivative((7*t - 4)/(-6*t - 12), t), ?)"
|
87 |
]
|
88 |
},
|
89 |
"metadata": {},
|
|
|
92 |
{
|
93 |
"data": {
|
94 |
"text/latex": [
|
95 |
+
"$\\displaystyle \\int \\left(4 y + e^{y} - 2\\right)\\, dy = ?$"
|
96 |
],
|
97 |
"text/plain": [
|
98 |
+
"Eq(Integral(4*y + exp(y) - 2, y), ?)"
|
99 |
]
|
100 |
},
|
101 |
"metadata": {},
|
|
|
116 |
{
|
117 |
"data": {
|
118 |
"text/latex": [
|
119 |
+
"$\\displaystyle \\frac{d}{d t} \\frac{7 t - 4}{- 6 t - 12} = \\frac{7}{- 6 t - 12} + \\frac{6 \\cdot \\left(7 t - 4\\right)}{\\left(- 6 t - 12\\right)^{2}}$"
|
120 |
],
|
121 |
"text/plain": [
|
122 |
+
"Eq(Derivative((7*t - 4)/(-6*t - 12), t), 7/(-6*t - 12) + 6*(7*t - 4)/(-6*t - 12)**2)"
|
123 |
]
|
124 |
},
|
125 |
"metadata": {},
|
|
|
128 |
{
|
129 |
"data": {
|
130 |
"text/latex": [
|
131 |
+
"$\\displaystyle \\int \\left(4 y + e^{y} - 2\\right)\\, dy = 2 y^{2} - 2 y + e^{y}$"
|
132 |
],
|
133 |
"text/plain": [
|
134 |
+
"Eq(Integral(4*y + exp(y) - 2, y), 2*y**2 - 2*y + exp(y))"
|
135 |
]
|
136 |
},
|
137 |
"metadata": {},
|
|
|
260 |
"rhs()"
|
261 |
]
|
262 |
},
|
263 |
+
{
|
264 |
+
"cell_type": "code",
|
265 |
+
"execution_count": 5,
|
266 |
+
"id": "964a5275",
|
267 |
+
"metadata": {},
|
268 |
+
"outputs": [],
|
269 |
+
"source": [
|
270 |
+
"if generate.clicked:\n",
|
271 |
+
" equation_count += 1\n",
|
272 |
+
" print(f\"Equation count {equation_count}\")"
|
273 |
+
]
|
274 |
+
},
|
275 |
{
|
276 |
"cell_type": "code",
|
277 |
"execution_count": null,
|
278 |
+
"id": "17c2d87c",
|
279 |
"metadata": {},
|
280 |
"outputs": [],
|
281 |
"source": []
|