Skip to content

Commit 3965dce

Browse files
committed
add another problem to the notebook
1 parent f9b2aa2 commit 3965dce

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

lectures/01-python/w5-python-more-examples.ipynb

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,30 @@
7171
"cell_type": "markdown",
7272
"metadata": {},
7373
"source": [
74-
"## Exercise 4: Calendar events\n",
74+
"## Exercise 4: Math practice\n",
75+
"\n",
76+
"We want to make a simple table of trigonometric functions for different angles. Write a code that outputs in columns, the following data:\n",
77+
"```\n",
78+
"angle (degrees) angle (radians) sin(angle) cos(angle) sin(angle)**2 + cos(angle)**2\n",
79+
"```\n",
80+
"\n",
81+
"For all angles spaced 30 degrees apart in the range 0 to 360 degrees.\n",
82+
"\n",
83+
"Keep in mind that the trig functions expect the input in radians."
84+
]
85+
},
86+
{
87+
"cell_type": "code",
88+
"execution_count": null,
89+
"metadata": {},
90+
"outputs": [],
91+
"source": []
92+
},
93+
{
94+
"cell_type": "markdown",
95+
"metadata": {},
96+
"source": [
97+
"## Exercise 5: Calendar events\n",
7598
"\n",
7699
"We want to keep a schedule of events. We will do this by creating a class called `Day`. It is sketched out below. A `Day` holds a list of events and has methods that allow you to add an delete events. Our events will be instances of a class `Event`, which holds the time, location, and description of the event.\n",
77100
"\n",

0 commit comments

Comments
 (0)