CourseWare Wiki
Switch Term
Winter 2023 / 2024
Winter 2022 / 2023
Winter 2021 / 2022
Winter 2020 / 2021
Winter 2019 / 2020
Winter 2018 / 2019
Older
Search
Log In
old
courses
be5b33prg
homeworks
files
Warning
This page is located in archive. Go to the latest version of this
course pages
.
Differences
This shows you the differences between two versions of the page.
View differences:
Side by Side
Inline
Go
Link to this comparison view
Both sides previous revision
Previous revision
2016/11/04 16:05 xposik [Homework: Files]
2015/12/01 16:14 xposik [Working with Counters]
2015/12/01 16:07 xposik [Report author counts]
2015/12/01 16:06 xposik [Index by author]
2015/12/01 15:51 xposik [Load library]
2015/12/01 15:45 xposik [Homework: Files]
2015/12/01 15:31 xposik [Homework: Files]
2015/12/01 14:58 xposik
2015/11/30 14:44 xposik
2015/11/27 14:42 xposik
2015/11/27 14:42 xposik created
Go
Next revision
Previous revision
2016/11/04 16:05 xposik [Homework: Files]
2015/12/01 16:14 xposik [Working with Counters]
2015/12/01 16:07 xposik [Report author counts]
2015/12/01 16:06 xposik [Index by author]
2015/12/01 15:51 xposik [Load library]
2015/12/01 15:45 xposik [Homework: Files]
2015/12/01 15:31 xposik [Homework: Files]
2015/12/01 14:58 xposik
2015/11/30 14:44 xposik
2015/11/27 14:42 xposik
2015/11/27 14:42 xposik created
Go
Next revision
Both sides next revision
courses:be5b33prg:homeworks:files [2015/12/01 15:51]
xposik
[Load library]
courses:be5b33prg:homeworks:files [2015/12/01 16:07]
xposik
[Report author counts]
Line 67:
Line 67:
* Outputs:
* Outputs:
* A dictionary containing book authors as keys and a **list** of all books of the respective author as values.
* A dictionary containing book authors as keys and a **list** of all books of the respective author as values.
+
+
If the input dictionary is empty, the function shall produce an empty dictionary as well.
For example, running the function on the following book dictionary (with reduced contents for the sake of brevity) would produce results shown below in the code:
For example, running the function on the following book dictionary (with reduced contents for the sake of brevity) would produce results shown below in the code:
Line 104:
Line 106:
</code>
</code>
-
The order of the lines is irrelevant. **Do not forget the TOTAL BOOKS line!**
+
The order of the lines is irrelevant. **Do not forget the TOTAL BOOKS line!**
If the input file is empty, the output file shall contain just the line ''TOTAL BOOKS: 0''.
**Suggestion:** There are basically 2 ways how to implement this function. You can either
**Suggestion:** There are basically 2 ways how to implement this function. You can either
courses/be5b33prg/homeworks/files.txt
· Last modified: 2016/11/04 16:05 by
xposik