Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 1687122

Browse files
Add exceptions part 2 notebook, fix part1
1 parent 16507c4 commit 1687122

File tree

7 files changed

+21806
-5
lines changed

7 files changed

+21806
-5
lines changed

‎week8/3_Exceptions.ipynb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1163,7 +1163,7 @@
11631163
},
11641164
{
11651165
"cell_type": "code",
1166-
"execution_count": null,
1166+
"execution_count": 12,
11671167
"metadata": {},
11681168
"outputs": [],
11691169
"source": [
@@ -1174,19 +1174,19 @@
11741174
"\n",
11751175
"\n",
11761176
"def get_month_name(index):\n",
1177-
" \"\"\"Return the number of the month and return its name.\"\"\"\n",
1177+
" \"\"\"Return the month name given its number.\"\"\"\n",
11781178
" return MONTHS[index - 1]\n",
11791179
"\n",
11801180
"\n",
1181-
"def get_month_ordinary_number(name):\n",
1182-
" \"\"\"Return the month ordinary number by its name.\"\"\"\n",
1181+
"def get_month_number(name):\n",
1182+
" \"\"\"Return the month number given its name.\"\"\"\n",
11831183
" return MONTHS.index(name) + 1\n",
11841184
"\n",
11851185
"\n",
11861186
"def is_same_month(index, name):\n",
11871187
" return (\n",
11881188
" get_month_name(index) == name\n",
1189-
" and get_month_ordinary_number(name) == index\n",
1189+
" and get_month_number(name) == index\n",
11901190
" )"
11911191
]
11921192
},

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /