ilsamoano
ilsamoano
I've initially tried trying to stick to the process ``` blank: '0' start state: A table: A: 0: { write: 0, L: B } B: 0: { write: 1, R:...
that's nice! I didn't think about to use the new A state!
``` blank: ' ' start state: A table: A: ' ': {write: 0, R: B} 0: {L: C} B: ' ': {write: 1, L: A} C: ' ': {write: 1,...
I had to look at my colleagues examples, but in the end I've understood the logic behind the following example ``` def test_my_enumerate(oldlist,expected): result = my_enumerate(oldlist) if result == expected:...
2 questions about the above: A] the algorithm should be able to solve all the possible 0-1 sequences? i.e. 11100 00111 10101 01110 etc? or we must pick one of...
thanks @delfimpandiani for taking time adding code's explanation ``` #Write in Python the function def my_reversed(input_list) #which behave like the built-in function reversed() #introduced in Section "Insertion sort" and returns...
``` def linear_search(input_list, value_to_search): # define function "linear_search" for position, item in enumerate(input_list): # iterate all the items in the input list, getting also their position on the list if...
I've understood in the end how Delfina & Lisa sorted the problem. Anyway my first approach was to create 2 new lists, saving in the first one every element of...
``` #test def test_fib(n, expected): if fib(n) == expected: return True else: return False #code def fib(n): if n
``` set_hobbit = set({"Frodo", "Sam", "Pippin", "Merry"}) set_magician = set ({"Saruman", "Gandalf"}) LOTR = dict() LOTR["hobbit"] = set_hobbit LOTR["magician"] = set_magician print(LOTR) # {'hobbit': {'Sam', 'Pippin', 'Frodo', 'Merry'}, 'magician': {'Gandalf',...