Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update Conditions/Comparisons notebook (York 2025)
  • Loading branch information
cnsavory authored Apr 10, 2025
commit a8d0f03212c326c5b915058432c17e70b79a5435
50 changes: 49 additions & 1 deletion notebooks/Conditions.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -483,9 +483,57 @@
"id": "116cf3f9-74fa-46fe-a06c-ee5cec0a4b9b",
"metadata": {},
"source": [
"1. "
"1. The following code needs the correct operator to replace the **BLANK** in the code to output True - what replaces the **BLANK**?"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "a827cfbe-7726-4a42-bb38-0468a752b998",
"metadata": {},
"outputs": [],
"source": [
"atomic_no_of_nitrogen = 7\n",
"atomic_no_of_fluorine = 9"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "81dd9a93-9296-4da8-be41-3f4fc6989d56",
"metadata": {},
"outputs": [],
"source": [
"atomic_no_of_nitrogen BLANK atomic_no_of_fluorine"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "b3f749e9-674c-428c-8eeb-df549473ebae",
"metadata": {},
"outputs": [],
"source": [
"### ANSWER: <, <= or != all work\n",
"atomic_no_of_nitrogen < atomic_no_of_fluorine"
]
},
{
"cell_type": "markdown",
"id": "5ccf3004-bb13-465f-90b9-a6c871c09f72",
"metadata": {},
"source": [
"2. The following code gives an output that doesn't match chemical intuition, can you fix it so that it will output a correct statement?"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "768b30a4-d3f7-4abd-97ae-6a27bcfcb9b7",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"id": "120f98bf-03ef-49b8-8338-6081411d2b10",
Expand Down