As many of you already know, there is a new mailing list for the course: compthink1718@googlegroups.com
It is a private mailing list: only the members can read and write messages
For subscribing to the mailing list, one has to send me an e-mail (silvio.peroni@unibo.it) asking for it, and I'll add him/her directly to the list
The old mailing list will be closed in a few days
There are no further communications
He was an Argentine short-story writer, poet, and essayist
He produced several works laying between philosophical literature and fantasy genre
Main topics of his works: dreams, labyrinths, libraries, mirrors, the notion of infinity, and religions
Big library, made of hexagonal rooms
20 bookshelves in four of the walls of each room (5 bookshelves per wall)
Each bookshelf contains 35 books
Each book counts 410 pages
Each page organised in 40 lines
Each line contains 80 characters
The library contains all the books that have been and will be written by using every possible combination of 25 basic characters: 22 letters, the period, the comma, and the space
Opening sentence: [the Library] is composed of an indefinite and perhaps infinite number of hexagonal galleries
The narrator suggests that the library is made of an infinite number of books, contained in an infinite number of rooms – however, is really this the case?
Mathematical infinity exists, it is an abstract concept: the set of all the prime numbers, which is an infinitive set
Often we refer to an infinite amount of something when actually we are speaking about a quite extensive and huge mass of stuff
It contains only 2*101834097 of books
That number has been obtained by considering all the possible combination of all the finite set of charaters in all the 410 pages in all the books that can be generated
In existing computational systems (e.g. an electronic computer), we must be aware that infinity (e.g. the tape of a Turing Machine) is an illusion
A set is a countable sequence of unordered and non-repeatable elements
Countable: it is possible to know the length of the set (i.e. how many elements it contains) – in ThyMopani, we can use the support algorithm def len(countable_object)
Unordered: the elements are placed in the set without any particular order
Unrepeatable: the elements cannot appear more than one time in the set
Create a new set: set()
Add new element: <set>.add(<element>)
Remove element: <set>.remove(<element>)
Add elements from another set: <set>.update(<another_set>)
my_first_set = set() my_first_set.add(34) my_first_set.add(15) my_first_set.add("Silvio") my_first_set.remove(34) my_first_set.update(my_first_set)
my_first_set =
34
15
"Silvio"
A dictionary is a countable collection of unordered key-value pairs, where the key is non-repeatable in the dictionary
Unrepeatability of keys: the same key cannot be included twice in the dictionary
Create a new dictionary: dict()
Add new pair: <dictionary>[<key>] = <value>
Remove a pair: del <dictionary>[<key>]
Get value by key: <dictionary>.get(<key>)
Add pairs from another dictionary: <dictionary>.update(<another_dictionary>)
my_first_dictionary = dict() my_first_dictionary["age"] = 34 my_first_dictionary["day of birth"] = 15 my_first_dictionary["name"] = "Silvio" del my_first_dictionary["age"] my_first_dictionary.update(my_first_dictionary) my_first_dictionary.get("name")
my_first_dictionary =
silvio.peroni@unibo.it 0000-0003-0530-4305 @essepuntato
Computational Thinking and Programming (A.Y. 2017/2018)
Second Cycle Degree in Digital Humanities and Digital Knowledge
Alma Mater Studiorum - Università di Bologna