From b89d9432297d01e731d5e16ad54c94ac6ce33b86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20=C5=81aniewski-Wo=C5=82=C5=82k?= Date: Wed, 8 Jun 2016 14:11:35 +0200 Subject: [PATCH 1/2] updated the readme [ci:skip] --- README.md | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 37b0e07..5c48fc7 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,24 @@ -First task from Python Course (and a testing ground for the grading system. +# Python Excercises (Task 1) -# Task +Create a file `solution.py` with the functions described below. -Create a `solution.py` script that will take a `input.png` file, and convert it to a text file `output.txt`. -And example input and out is in the files: [input](.test/meil.png) [output](.test/meil.txt) +### Preparation + +First fork this repository, by clicking the nice [**Fork**](https://github.com/ccfd/python_task1#fork-destination-box) button on the top of the page. Then you'll have your own copy of the repository. You can open it in your favorite Python editor. + +Create the needed files and add them to your repository (`git add solution.py`). Then, push them to your fork at github (`git push`). You should see yourself in the [network graph](https://github.com/ccfd/python_task1/network). Now you are ready to solve the problems at hand. + +### Testing + +You should test your functions before you submit them to us. + +After you've solved all the excercises, push them all to your fork. Check if all your changes are visible on github.com and create a Pull Request (a nice green button on top of your fork page). The pull request will be automagickly tested with [Travis-CI](https://travis-ci.org/). The results will show as a green checkmark or a sad red x. + +**Libraries:** In this task, you *can* use `scipy`, `numpy`, or `matplotlib` + +## Excercise + +Write a python script `solution.py` that will read a `input.png` file, reduce the resolution to 20x20 and create a text file `output.txt` filled with 20x20 characters. The character should depend on the brightness of the pixel of the image: +- ' ' for brightness < 0.3 +- '-' for brightness in [0.3 0.6] +- '|' for brightness above 0.6 From c9bed445706bd751af2f726f1c64aee70fb7fd10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20=C5=81aniewski-Wo=C5=82=C5=82k?= Date: Wed, 8 Jun 2016 14:13:06 +0200 Subject: [PATCH 2/2] Adding links to readme [ci:skip] --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 5c48fc7..14f3161 100644 --- a/README.md +++ b/README.md @@ -22,3 +22,5 @@ Write a python script `solution.py` that will read a `input.png` file, reduce th - ' ' for brightness < 0.3 - '-' for brightness in [0.3 0.6] - '|' for brightness above 0.6 + +And example input and out is in the files: (input)[.test/meil.png] (output)[.test/meil.txt]