Skip to content

Commit

Permalink
Add extra description to answer
Browse files Browse the repository at this point in the history
  • Loading branch information
nf679 committed Aug 14, 2024
1 parent aa3f31f commit d9bf638
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions python-intro/solutions/ex12_for_loops.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -217,16 +217,10 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 1,
"id": "822b49d8-e5fe-42e9-b99b-0e67c09d18fd",
"metadata": {
"editable": true,
"execution": {
"iopub.execute_input": "2023-10-23T10:35:25.961126Z",
"iopub.status.busy": "2023-10-23T10:35:25.960684Z",
"iopub.status.idle": "2023-10-23T10:35:25.967160Z",
"shell.execute_reply": "2023-10-23T10:35:25.966241Z"
},
"slideshow": {
"slide_type": ""
},
Expand All @@ -244,6 +238,7 @@
}
],
"source": [
"# This reverses the order of the string because we are going through the word a character at a time and appending each character to the start of the string - i.e. s, o+s, f+os, etc. Take a look at the value of result in each iteration of the loop.\n",
"original = \"software carpentry\"\n",
"result = \"\"\n",
"for character in original:\n",
Expand Down Expand Up @@ -396,7 +391,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.5"
"version": "3.11.9"
}
},
"nbformat": 4,
Expand Down

0 comments on commit d9bf638

Please sign in to comment.