I got some assignments that were written in jupyter notebook where the code is written as json text and with marksdown, my problem however is that some of the text is very readable so l am able to read the text to the assignements while the code starting from { to } seems unreadable. Therefore l am wondering if the code containing cells, id, metadata etc is supposed to readable or if it is just a matter of formatting?
I have tried different solutions such as opening the file in jupyter notebook, seperating the code and etc in jupyter notebook so that the code and markdowns are seperated. I have tried to Google around and find some solutions but was unable to find any. The file type is ipynb (Jupyter Source File).
To try to clearify my question. I am supposed to be able to convert the code and the markdowns into one file? I am able to copy and paste the markdown text since it is plain text but can not really figure out what to do with the actually code in the text. Grateful if anybody has some tips on how to solve this. Also to clearify, l do not need help to solve the actually assignement in the text, just being able to read to text.
{
"cells": [
{
"cell_type": "markdown",
"id": "13935fcb",
"metadata": {},
"source": [
"# Exercise 1"
]
},
{
"cell_type": "markdown",
"id": "b3f0b8fb",
"metadata": {},
"source": [
"# Task 1: Population Growth\n",
"----\n",
"\n",
"Build upon the example from the lecture about population growth in Iceland and write the following program:\n",
"\n",
"* The program prompts the user for:\n",
" - Name of the area (e.g., Iceland, Finnmark, etc.)\n",
" - Growth rate\n",
" - Start year\n",
" - End year\n",
" - Population at the start year\n",
"* The program calculates the population size at the end year\n",
"* The program summarizes and provides feedback about the provided values\n",
"* The program displays the population at the end year\n",
"* The program indicates how much the population has grown in absolute numbers and relative to the initial population (in percentage)\n",
"\n",
"Population growth is assumed to be described by the logistic equation as follows:\n",
"\n",
"
\n
"
,
"
(
)
=
1
+
−
\n
"
,
"
\n","P(t)=
fracK1+Ae
−rt
\n","\n",
"Where:\n",
"* $P(t)$: Population at time $t$\n",
"* $t$ is the time\n",
"* $r$ is the relative growth rate, e.g., 2%\n",
"* $K$ is the carrying capacity of the population\n",
"* $e$ is Euler's number: $e\approx 2.71828$\n",
"\n",
"$A$ is a coefficient defined as:\n",
"
\n
"
,
"
=
−
0
0
\n
"
,
"
\n","A=
fracK−P
0
P
0
\n","\n",
"Where $P_0$ is the population at $t=0$"
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "5a2b55e4",
"metadata": {},
"outputs": [],
"source": [
"\n",
"# Your code here :)\n"
]
},
{
"cell_type": "markdown",
"id": "57d2e25e",
"metadata": {},
"source": [
"# Task 2: Savings Calculator\n",
"----\n",
"\n",
"If we save a fixed amount $P$ that we deposit into an account $n$ times per year, with an annual interest rate of $r$ percent, and we save for $t$ years, the final amount in the savings account is given by:\n",
"
\n
"
,
"
=
(
(
1
+
)
\n
"
,
"
\n","F=P
cdot
left(
fracleft(1+fracrnright)
nt
−1fracrn
right)\n","\n",
"\n",
"Create a program that asks the user to input the deposit amount, interest rate, number of deposits/interest adjustments per year, and the number of years. The program should provide the following feedback:\n",
"* The program summarizes and provides feedback on the numbers entered by the user\n",
"* The program calculates and displays the final amount in the savings account\n",
"* The program indicates how much of the final amount is interest and deposits, both in percentage and amount\n",
"\n",
"(Note that $r$ in the formula is not in percentage; for example, 2% = 0.02)\n",
"\n",
"### If You Want\n",
"----\n",
"If you'd like, you can also incorporate inflation, wealth tax (approximately 1%), and a tax rate (22% of interest income) into the calculations."
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "6bab3d75",
"metadata": {},
"outputs": [],
"source": [
"\n",
"# Your code here :)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.12"
}
},
"nbformat": 4,
"nbformat_minor": 5
}