Remove the IPYNB Checkpoints, Did Week 5 HW
-- IPYNB Checkpoints ++ Git Ignore File for IPYNB Checkpoints +- Week 5 Homework Files
This commit is contained in:
parent
4fc499169b
commit
140ffc6523
7 changed files with 219 additions and 60 deletions
|
|
@ -23,11 +23,23 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 3,
|
||||
"execution_count": 1,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"1.0"
|
||||
]
|
||||
},
|
||||
"execution_count": 1,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"rounded = ...\n",
|
||||
"# Round can take two parameters, the first is the number to round, while the second is the decimal places in which to round to.\n",
|
||||
"rounded = round(1.23456789, 0)\n",
|
||||
"rounded"
|
||||
]
|
||||
},
|
||||
|
|
@ -42,11 +54,23 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 5,
|
||||
"execution_count": 2,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"1.235"
|
||||
]
|
||||
},
|
||||
"execution_count": 2,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"less_rounded = ...\n",
|
||||
"# Using round, with the second parameter as three, you get three decimal point precision.\n",
|
||||
"less_rounded = round(1.23456789, 3)\n",
|
||||
"less_rounded"
|
||||
]
|
||||
},
|
||||
|
|
@ -67,11 +91,22 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 7,
|
||||
"execution_count": 3,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"71.0"
|
||||
]
|
||||
},
|
||||
"execution_count": 3,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"sum_of_rounded_amounts = ...\n",
|
||||
"sum_of_rounded_amounts = round(32.25, 0) + round(15.00, 0) + round(24.45, 0)\n",
|
||||
"sum_of_rounded_amounts"
|
||||
]
|
||||
},
|
||||
|
|
@ -84,18 +119,29 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 9,
|
||||
"execution_count": 4,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"72.0"
|
||||
]
|
||||
},
|
||||
"execution_count": 4,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"rounded_sum = ...\n",
|
||||
"rounded_sum = round((32.25 + 15.00 + 24.45), 0)\n",
|
||||
"rounded_sum"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3",
|
||||
"display_name": "Python 3 (ipykernel)",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
},
|
||||
|
|
@ -109,7 +155,7 @@
|
|||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.8.3"
|
||||
"version": "3.9.12"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue