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.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
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