2018-2019
2018-2019 copied to clipboard
The GitHub repository containing all the material related to the Computational Thinking and Programming course of the Digital Humanities and Digital Knowledge degree at the University of Bologna (a.a....
Consider the set created in the [first exercise](https://github.com/comp-think/2018-2019/issues/20), stored in the variable `my_set`. Describe the status of `my_set` after the execution of each of the following operations: `my_set.remove("Bilbo")`, `my_set.add("Galadriel")`, `my_set.update(set({"Saruman",...
Hi all, I have a question about an exercise in one of last year test. We have to make the idf using only the document "d" (and in consequence of...
Write in Python the function `def my_reversed(input_list)` which behave like the built-in function `reversed()` introduced in [Section "Insertion sort"](https://comp-think.github.io/2018-2019/lecture-notes/06%20-%20Brute-force%20algorithms.pdf) and returns a proper list, and accompany the function with the...
Implement the informal algorithm introduced in [Section "Greedy algorithms"](https://comp-think.github.io/2018-2019/lecture-notes/14%20-%20Greedy%20algorithms.pdf) for returning the minimum amount of coins for a change.
Write in Python the function `def my_enumerate(input_list)` which behave like the built-in function `enumerate()` introduced in [Section "Linear search"](https://comp-think.github.io/2018-2019/lecture-notes/06%20-%20Brute-force%20algorithms.pdf) and returns a proper list, and accompany the function with the...
Suppose that all the elements in the set returned by the [second exercise](https://github.com/comp-think/2018-2019/issues/21) have been organised in two different sets, i.e. `set_hobbit` that refers to the set `set({"Frodo", "Sam", "Pippin",...
Consider the list of co-authors of Tim Berners-Lee as illustrated in the write box at http://dblp.uni-trier.de/pers/hd/b/Berners=Lee:Tim. Build an undirected graph that contains Tim Berners Lee as the central node and...
Propose some variation to the implementation of the [peg solitaire exercise](https://comp-think.github.io/2018-2019/lecture-notes/13%20-%20Backtracking%20algorithms.pdf) in order to make it more efficient – in particular, avoiding unsuccessful configurations if they have been already encountered...
Create a directed graph which relates the actors Brad Pitt, Eva Green, George Clooney, Catherine Zeta-Jones, Johnny Depp, and Helena Bonham Carter to the following movies: Ocean's Twelve, Fight Club,...
Implement in Python the partition algorithm – i.e. `def partition(input_list, start, end, pivot_position)` – that takes a list and the positions of the first and last elements in the list...