Add files via upload

This commit is contained in:
Peter Norvig 2024-04-11 01:02:57 -07:00 committed by GitHub
parent ad820b67a1
commit 0321f7280f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -24,7 +24,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 1,
"id": "158c20d7-c4d4-463e-b228-248f39220cad",
"metadata": {},
"outputs": [],
@ -51,7 +51,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 2,
"id": "4ac87ea7-7ad9-48e2-a21f-fb772e540487",
"metadata": {},
"outputs": [],
@ -75,7 +75,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 3,
"id": "3000881a-f2b0-4e00-9bfa-9c358a94de2c",
"metadata": {},
"outputs": [],
@ -96,7 +96,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 4,
"id": "15bbdbb7-b16d-4347-80c1-bdac375a95b4",
"metadata": {},
"outputs": [],
@ -117,7 +117,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 5,
"id": "701bb096-d90e-4a45-bfbb-58ea2106fdd5",
"metadata": {},
"outputs": [],
@ -138,7 +138,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 6,
"id": "dc686d52-2c8d-4e2b-be41-d8c354ef903e",
"metadata": {},
"outputs": [],
@ -165,10 +165,21 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 7,
"id": "9e6c81b8-1665-47cf-83f3-bf010bb6aa3d",
"metadata": {},
"outputs": [],
"outputs": [
{
"data": {
"text/plain": [
"True"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"def test_rainfall():\n",
" assert 0/2 == rainfall([0, 0]), \"no rain\"\n",
@ -200,7 +211,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 8,
"id": "ba65e450-bb0c-44bf-94a3-8aef055e6f01",
"metadata": {},
"outputs": [],
@ -231,7 +242,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 9,
"id": "69712e85-906e-4e52-bbdc-c809b95cbfb2",
"metadata": {},
"outputs": [],
@ -252,7 +263,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 10,
"id": "a946e971-c9a1-46ce-9c9c-b5cc6b28630a",
"metadata": {},
"outputs": [],
@ -278,10 +289,21 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 11,
"id": "7ed48c0d-360f-47fc-acb3-8dc59f548d78",
"metadata": {},
"outputs": [],
"outputs": [
{
"data": {
"text/plain": [
"[7-11, 25]"
]
},
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"[Segment(7, 11), Segment(25, 25)]"
]
@ -296,7 +318,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 12,
"id": "c39f92a8-03d2-4e80-8c24-0450ff8d989a",
"metadata": {},
"outputs": [],
@ -318,7 +340,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 13,
"id": "f501c7aa-2077-4f1e-96fd-ea85ca1c20ed",
"metadata": {},
"outputs": [],
@ -339,7 +361,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 14,
"id": "ebd7b8ff-1375-4c20-b72c-c72c6497f925",
"metadata": {},
"outputs": [],
@ -365,7 +387,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 15,
"id": "fdd08113-3d84-46d9-88e6-727acb82502d",
"metadata": {},
"outputs": [],
@ -391,10 +413,21 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 16,
"id": "d6540c49-0782-4245-9c7a-e1ad7f67be0e",
"metadata": {},
"outputs": [],
"outputs": [
{
"data": {
"text/plain": [
"True"
]
},
"execution_count": 16,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"def test_segments():\n",
" assert segments([]) == [], \"empty numbers\"\n",