Skip to content

Commit 74d14bc

Browse files
authored
Merge pull request #46 from DurhamARC-Training/feb26-improvements
Feb26 improvements
2 parents ffb57af + 5d4c48c commit 74d14bc

3 files changed

Lines changed: 39 additions & 4 deletions

File tree

Basics.ipynb

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -484,6 +484,18 @@
484484
"### _<ins>Example</ins>:_ Print type of a variable"
485485
]
486486
},
487+
{
488+
"cell_type": "markdown",
489+
"id": "98edd5e0",
490+
"metadata": {
491+
"editable": false
492+
},
493+
"source": [
494+
"The `print` function which outputs text or variable values to the screen so they are visible while the program runs.\n",
495+
"\n",
496+
"This is one way to allow you to see what your program is doing as it executes."
497+
]
498+
},
487499
{
488500
"cell_type": "markdown",
489501
"id": "dace0de0",
@@ -1072,7 +1084,12 @@
10721084
"editable": false
10731085
},
10741086
"source": [
1075-
"- Errors in computer programs are called ``bugs'' for historic reasons.\n",
1087+
"<center>\n",
1088+
" <img src=\"./images/First_Computer_Bug,_1947.jpg\" width=\"30%\">\n",
1089+
"</center>\n",
1090+
"\n",
1091+
"\n",
1092+
"- Errors in computer programs are called 'bugs` for historic reasons.\n",
10761093
"- For complex projects, you will usually spend more time testing and debugging than writing code.\n",
10771094
"- Three types of errors:\n",
10781095
" - Syntax errors - written the code wrongly\n",
@@ -3301,7 +3318,7 @@
33013318
"name": "python",
33023319
"nbconvert_exporter": "python",
33033320
"pygments_lexer": "ipython3",
3304-
"version": "3.14.0"
3321+
"version": "3.10.12"
33053322
}
33063323
},
33073324
"nbformat": 4,

Basics_filled.ipynb

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -672,6 +672,16 @@
672672
"### _<ins>Example</ins>:_ Print type of a variable"
673673
]
674674
},
675+
{
676+
"cell_type": "markdown",
677+
"id": "98edd5e0",
678+
"metadata": {},
679+
"source": [
680+
"The `print` function which outputs text or variable values to the screen so they are visible while the program runs.\n",
681+
"\n",
682+
"This is one way to allow you to see what your program is doing as it executes."
683+
]
684+
},
675685
{
676686
"cell_type": "markdown",
677687
"id": "dace0de0",
@@ -783,6 +793,8 @@
783793
"source": [
784794
"In this example we see the print statement again. It will usually expect a string, or something that can be converted to a string.\n",
785795
"\n",
796+
"The term `screen` is used rather than `standard output` to be less abstract to learners\n",
797+
"\n",
786798
"Here we are saying that the variable \"myString2 should have the string value 'He said \"Hello\"', and then put the print statement separately. The \"type\" command is able to tell us, what type the variable ``myString'' has. [demonstrate]\n",
787799
"\n",
788800
"As a side note, many programming languages, in particular compiled programming languages, require you to explicitly state the data type of your variable when you create it. We do not need to do that here."
@@ -1415,7 +1427,12 @@
14151427
}
14161428
},
14171429
"source": [
1418-
"- Errors in computer programs are called ``bugs'' for historic reasons.\n",
1430+
"<center>\n",
1431+
" <img src=\"./images/First_Computer_Bug,_1947.jpg\" width=\"30%\">\n",
1432+
"</center>\n",
1433+
"\n",
1434+
"\n",
1435+
"- Errors in computer programs are called 'bugs` for historic reasons.\n",
14191436
"- For complex projects, you will usually spend more time testing and debugging than writing code.\n",
14201437
"- Three types of errors:\n",
14211438
" - Syntax errors - written the code wrongly\n",
@@ -1444,6 +1461,7 @@
14441461
}
14451462
},
14461463
"source": [
1464+
"- This is a moth which was discovered trapped within the Harvard Mark II computer in 1947, the first case of an actual computer bug! Although the term `bug` was already in use at this point.\n",
14471465
"- The other thing I want to mention at this points are errors. As soon as you start programming you will make mistakes. Everyone does that, even the most experienced programmers spend a lot of time hunting for bugs in their code. \"Bugs\" is a common term for errors in computer programs. It is said that this term originates from a time when actual insects in the hardware of a computer or another machine were the cause for malfunctions. There is a number of different opinions on when the term was first used, but I won't go into that here. Looking for and removing these errors is also called \"debugging\"."
14481466
]
14491467
},
@@ -3861,7 +3879,7 @@
38613879
"name": "python",
38623880
"nbconvert_exporter": "python",
38633881
"pygments_lexer": "ipython3",
3864-
"version": "3.14.0"
3882+
"version": "3.10.12"
38653883
}
38663884
},
38673885
"nbformat": 4,
5.35 MB
Loading

0 commit comments

Comments
 (0)