This commit is contained in:
ltcptgeneral 2020-05-12 20:48:45 -05:00
parent 69c156bd58
commit 090396c278

View File

@ -136,101 +136,6 @@
"string = \"8^32*4/-2+0.8\"\n",
"evaluate(string)"
]
},
{
"cell_type": "code",
"execution_count": 23,
"metadata": {},
"outputs": [],
"source": [
"from sympy import symbols, solve"
]
},
{
"cell_type": "code",
"execution_count": 26,
"metadata": {},
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": "[6]"
},
"metadata": {},
"execution_count": 26
}
],
"source": [
"x = symbols(\"x\")\n",
"expr = x-4-2\n",
"sol = solve(expr)\n",
"sol"
]
},
{
"cell_type": "code",
"execution_count": 27,
"metadata": {},
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": "x - 6\n"
}
],
"source": [
"print(expr)"
]
},
{
"cell_type": "code",
"execution_count": 28,
"metadata": {},
"outputs": [],
"source": [
"expr = \"x-4-2\""
]
},
{
"cell_type": "code",
"execution_count": 29,
"metadata": {},
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": "[6]"
},
"metadata": {},
"execution_count": 29
}
],
"source": [
"sol = solve(expr)\n",
"sol"
]
},
{
"cell_type": "code",
"execution_count": 30,
"metadata": {},
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": "x-4-2\n"
}
],
"source": [
"print(expr)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {