Simay Güzel
Simay Güzel
``` # I already have the set that I have done in the first exercise which is {'Sam', 'Bilbo', 'Frodo', 'Merry', 'Pippin'} hobbitset.remove("Bilbo") hobbitset.add("Galadriel") hobbitset.update(set({"Saruman","Frodo","Gandalf"})) #since there is no need...
``` hobbitset = set() hobbitset.add("Bilbo") hobbitset.add("Frodo") hobbitset.add("Sam") hobbitset.add("Pippin") hobbitset.add("Merry") print(hobbitset) output = {'Sam', 'Bilbo', 'Frodo', 'Merry', 'Pippin'} ```
string1 = "Peroni" string2 = "HTML" bibentry = "Peroni, S., Osborne, F., Di Iorio, A., Nuzzolese, A. G., Poggi, F., Vitali, F., Motta, E. (2017). Research Articles in Simplified HTML:...

def F(n): if (n == 0) : return 0 if (n == 1 or n== 2) : return 1 else: return F(n-1)+F(n-2) print (F(7)) Output: 13
Situation 1: Assembling some furniture's parts Situation 2: Implementing an algorithm Common features: - there are some steps to be followed, - the steps should be followed respectively.
"spam" not in "spa span sparql" = True ("egg" > "span") = False --- not False = True According to the Boolean value; True and True = True
``` my_queue = deque ( ["Draco", "Harry", "Hermione", "Ron", "Severus"] ) my_queue.popleft( ) ``` #'Draco' is extracted from my_queue because the element on the left is supposed to be removed...
list_str = list ( ) list_str.append("Harry") list_str.append("Draco") list_str.append("Hermione") list_str.append("Ron") list_str.append("Severus") list_str.sort( ) print (list_str) output : ['Draco', 'Harry', 'Hermione', 'Ron', 'Severus']
my_stack = deque ( ) my_stack = (["Draco", "Harry", "Hermione", "Ron", "Severus"]) my_stack.pop( ) output is 'Severus' #"Severus" is extracted from my_stack. Now my_stack is ['Draco', 'Harry', 'Hermione', 'Ron']. my_stack.pop(...