Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Improved description of exercises #116

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 21, 2023
Merged
Changes from all commits
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
18 changes: 14 additions & 4 deletions 18 input_output.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"1. Complete the function `solution_print_odd` to **print** all the *odd* numbers between 0 and `n`. The value of `n` is provided as the single parameter of the function."
"1. Complete the function `solution_print_odd` to **print** all the *odd* numbers between 0 and `n`, **without `n`**. The value of `n` is provided as the parameter of the function `solution_print_odd`."
]
},
{
Expand All @@ -155,7 +155,7 @@
"\n",
"<div class=\"alert alert-block alert-warning\">\n",
" <h4><b>Note</b></h4>\n",
" There is no test for this exercise because of the way capturing the user input works\n",
" There is no test for this exercise because we cannot easily interact with <code>input</code> in our testing framework. You can check visually if the input does what is expected.\n",
"</div>"
]
},
Expand Down Expand Up @@ -597,7 +597,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"1. Modify the function `solution_write_file` to write the sentence \"python tutorial 2023\" to the file `output_file` passed as argument to the function"
"1. Modify the function `solution_write_file` to write the sentence \"python tutorial 2023\" (**without quotes**) to the file `output_file`, which is available as a `Path` object as argument to the function."
]
},
{
Expand All @@ -621,7 +621,17 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"2. Modify the function `solution_read_write_file` to read the lines from the file `input_file` and write them in the form `line, length`, to the file `output_file`. Here `line` is the corresponding line of text in `input_file`, `length` is **number of characters** in that line"
"1. Modify the function `solution_read_write_file` to read the lines from the file `input_file` and write them in the form `line, length`, to the file `output_file`. Here `line` is the line of text in `input_file` **without the line ending**, `length` is **number of characters** in that line.\n",
"If `input_file` contains these lines:\n",
" ```\n",
" first\n",
" second\n",
" ```\n",
" we expect the output file to contain these lines:\n",
" ```\n",
" first, 5\n",
" second, 6\n",
" ```"
]
},
{
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.