Davide Apolloni

Results 13 comments of Davide Apolloni

![screenshot at nov 29 17-05-04](https://user-images.githubusercontent.com/44606693/49234773-f739cf00-f3f8-11e8-90dc-e7c908ec9ef1.png)

#Test case for the algorithm def test_fib(n, expected): result = fib(n) if expected == result: return True else: return False #Code of the algorithm def fib(n): if n

set_hobbits = set({"Frodo", "Sam", "Pippin", "Merry"}) set_magicians = set({"Saruman", "Gandalf"}) middle_earth = dict() middle_earth["hobbits"] = set_hobbits middle_earth["magicians"] = set_magicians print(middle_earth)

#Test case for the algorithm def test_expontentiation(n, exponent, expected) result = exponentiation(n, exponent) if expected == result return True else return False #Code of the algorithm def exponentation(n, e): if...

![screenshot at nov 29 17-29-45](https://user-images.githubusercontent.com/44606693/49236446-69f87980-f3fc-11e8-8831-5caba24757af.png)

my_set=({"Bilbo", "Frodo", "Sam", "Pippin", "Merry"}) my_set.remove("Bilbo") _#"Bilbo" wears the one ring and disappears from the set_ **output**: my_set({"Frodo", "Sam", "Pippin", "Merry"}) my_set.add("Galadriel") _#"Galadriel" joins the set while she is looking...

![screenshot at dic 01 18-01-19](https://user-images.githubusercontent.com/44606693/49330741-25531680-f593-11e8-93a6-0a8a1fa56b35.png)

"spam" not in "spa span sparql" and not ("egg" > "span") "spam" not in "spa span sparql" --> true ("egg" > "span") --> false true and not (false) true and...

my_queue=deque(["Draco", "Harry", "Hermione", "Ron", "Severus"]) my_queue.popleft() my_queue=deque(["Harry", "Hermione", "Ron", "Severus"]) my_queue.append("Voldemort") my_queue=deque(["Harry", "Hermione", "Ron", "Severus", "Voldemort"]) my_queue.popleft() my_queue=deque(["Hermione", "Ron", "Severus", "Voldemort"])

![screenshot at nov 24 11-22-27](https://user-images.githubusercontent.com/44606693/48967042-5653aa00-efdb-11e8-90a0-4e37ccaf57cb.png) Output: ['Draco', 'Harry', 'Hermione', 'Ron', 'Severus']