Skip to content

Commit

Permalink
Bug fixes and improvements (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrguseinov authored Oct 17, 2024
1 parent 97148de commit 88646ea
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 18 deletions.
16 changes: 8 additions & 8 deletions chapters/chapter-01/chapter-01-quiz-2.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"\n",
"1. The information stored in memory vanishes when the computer is turned off.\n",
"2. Memory devices are cheaper per GB than storage devices.\n",
"3. Memory is faster than storage.\n",
"3. Memory is usually faster than storage.\n",
"4. Storage devices are cheaper per GB than memory devices.\n",
"5. The information stored in storage vanishes when the computer is turned off."
]
Expand Down Expand Up @@ -155,10 +155,10 @@
"\n",
"Check all that apply.\n",
"\n",
"1. Developers generally write programs using high-level languages.\n",
"2. A high-level language is a language that computers can understand.\n",
"3. A disassembler is a program that translates machine language into assembly language (the inverse of an assembler).\n",
"4. Only interpreters can be used to convert a program written in a high-level language into machine code."
"1. Developers generally use high-level languages.\n",
"2. A high-level language can be executed directly on a computer.\n",
"3. A disassembler translates machine language into assembly language (the inverse of an assembler).\n",
"4. Only interpreters convert high-level language code into machine code."
]
},
{
Expand All @@ -182,10 +182,10 @@
"\n",
"Check all that apply.\n",
"\n",
"1. A compiler is a program that translates code written in one programming language into another language.\n",
"1. A compiler translates code from one programming language into another language.\n",
"2. Interpreters translate the whole program in one go.\n",
"3. Compilers execute a program one statement at a time.\n",
"4. An interpreter is a program that directly executes instructions written in a programming language without requiring them to be pre-compiled into machine code."
"4. An interpreter directly executes programming language instructions without requiring them to be pre-compiled into machine code."
]
},
{
Expand Down Expand Up @@ -354,7 +354,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.3"
"version": "3.12.2"
}
},
"nbformat": 4,
Expand Down
15 changes: 7 additions & 8 deletions chapters/chapter-13/chapter-13-task-3.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@
"\n",
"Contact a web service to retrieve and parse some JSON data.\n",
"\n",
"Use the following API endpoint: `http://py4e-data.dr-chuck.net/json?`. It has a static subset of the Google Maps data.\n",
"Use the following API endpoint: `http://py4e-data.dr-chuck.net/opengeo`. It has a static subset of the OpenStreetMap data.\n",
"\n",
"To call the API, include a `key=42` parameter and provide the address that you are requesting as the `address` parameter. To properly encode parameters use the `urllib.parse.urlencode()` function.\n",
"To call the API, provide the address that you are requesting as the `q` parameter. It should be properly URL encoded using the `urllib.parse.urlencode()` function.\n",
"\n",
"Return the first `place_id` from the response.\n",
"Return the first `plus_code` from the response.\n",
"\n",
"---\n",
"\n",
"After running the cell, you should see the following output: `'ChIJNeHD4p-540AR2Q0_ZjwmKJ8'`"
"After running the cell, you should see the following output: `'6FV8QPRJ+VQ'`"
]
},
{
Expand All @@ -52,9 +52,8 @@
"\n",
"\n",
"def foo(address):\n",
" endpoint = \"http://py4e-data.dr-chuck.net/json?\"\n",
" parameters = {\"address\": address, \"key\": 42}\n",
" url = endpoint + urllib.parse.urlencode(parameters)\n",
" endpoint = \"http://py4e-data.dr-chuck.net/opengeo?\"\n",
" url = endpoint + urllib.parse.urlencode({\"q\": address})\n",
"\n",
" # ========== YOUR CODE HERE ==========\n",
" \n",
Expand Down Expand Up @@ -112,7 +111,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.8"
"version": "3.12.2"
}
},
"nbformat": 4,
Expand Down
4 changes: 2 additions & 2 deletions helpers/submitters/data/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,8 @@
(["http://py4e-data.dr-chuck.net/comments_297239.json"], 2494),
],
"13.3": [
(["South Federal University"], "ChIJNeHD4p-540AR2Q0_ZjwmKJ8"),
(["Northwestern University"], "ChIJOUw-cAvQD4gRBmHV-me1Nyw"),
(["South Federal University"], "6FV8QPRJ+VQ"),
(["Simon Bolivar University"], "47RFHC3H+G6"),
],
"14.1": [
(
Expand Down

0 comments on commit 88646ea

Please sign in to comment.