Skip to content

Commit

Permalink
Merge pull request #181 from ilonabudapesti/master
Browse files Browse the repository at this point in the history
clarify day 1 homework
  • Loading branch information
ilonabudapesti authored Jul 24, 2018
2 parents 0b78b42 + 4f58aa9 commit a91a687
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions summer-of-code/week-02/day1.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,31 +79,39 @@ print(​'Come again soon!')​
#### Reading and writing files


#### Things to Try
# Things to Try

- Calculate a table for each letter in the alphabet from a-z, and count how many times each letter appears in `alice_in_wonderland.txt` (fancy word for counting stuff is "frequency distribution" - because you are counting the frequency of something)

# a: 34,560
# b: 5,027
# ...
# z: 893
a: 34,560

b: 5,027

...

z: 893

Store the results in a list of lists:

```python
result = [
["a", 34560],
["b", 5027],
...
["z", 893]
]
```

Hint: use python's lower() method to turn all alphabetic letters into small case and count them (so "A" counts towards "a").

Hint: Ignore non-alphabetic numbers, you can check with python isalpha() method.

#### Optional
### Optional

- If you have already started Python the Hard Way, please choose 5 exercises and write tests for those in unittest and make them pass. Take your ex.py and your test_ex.py and zip them into a single file to upload for submission via the Helpdesk.

- If you haven't started it and you have the .pdf then start the exercises. e.g. 1 - 10 a day
- If you haven't started it and you have the .pdf then start the exercises. e.g. 1 - 10 a day. Please note that exercises differ a lot: some are very short, so you could complete more than one a day. Some of them e.g. ex 37 are very long and have long lists of things to try (almost like a reference) as well as many exercises within them. These longer ones could take several days, if not weeks to complete fully.

Aim to read through about 10 a day, and to complete 1 a day, if you can. You are encouraged to work WITH mentors all the time, if you have access to them in Gold and VIP, and/or to work with each other in pairs or even groups if you are DIYers.


0 comments on commit a91a687

Please sign in to comment.