<?xml version="1.0"?>
<rss version="2.0">
   <channel>
      <title>Learning Diary for &quot;Introduction to Python&quot; course by Eleni Zalavra</title>
      <link>https://padlet.com/ezalavra/yfyv643jg8vu</link>
      <description></description>
      <language>en-us</language>
      <pubDate>2017-09-26 16:29:48 UTC</pubDate>
      <lastBuildDate>2023-04-12 16:49:36 UTC</lastBuildDate>
      <webMaster>hello@padlet.com</webMaster>
      <image>
         <url></url>
      </image>
      <item>
         <title>Download Python</title>
         <author>ezalavra</author>
         <link>https://padlet.com/ezalavra/yfyv643jg8vu/wish/327067155</link>
         <description><![CDATA[<div><a href="https://www.anaconda.com/distribution/">https://www.anaconda.com/distribution/</a></div>]]></description>
         <enclosure url="https://www.anaconda.com/distribution/" />
         <pubDate>2019-02-03 15:51:01 UTC</pubDate>
         <guid>https://padlet.com/ezalavra/yfyv643jg8vu/wish/327067155</guid>
      </item>
      <item>
         <title>Configuring Spyder</title>
         <author>ezalavra</author>
         <link>https://padlet.com/ezalavra/yfyv643jg8vu/wish/327067284</link>
         <description><![CDATA[<div>Tools -&gt; preferences <br>"Clear variables before execution”<br>To work with plots, you will need these Python library packages: matplotlib and numpy. -&gt; <br>Start Spyder and type “import numpy” and “import matplotlib” into the prompts.<br><br></div><div><br><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2019-02-03 15:52:20 UTC</pubDate>
         <guid>https://padlet.com/ezalavra/yfyv643jg8vu/wish/327067284</guid>
      </item>
      <item>
         <title>Spyder Application Overview</title>
         <author>ezalavra</author>
         <link>https://padlet.com/ezalavra/yfyv643jg8vu/wish/327067418</link>
         <description><![CDATA[<ul><li><mark>Code Editor</mark> that lets you create and edit existing Python source files </li><li><mark>IPython interpreter </mark>pane, which gives you access to the Python interactive mode </li></ul><div><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2019-02-03 15:53:34 UTC</pubDate>
         <guid>https://padlet.com/ezalavra/yfyv643jg8vu/wish/327067418</guid>
      </item>
      <item>
         <title>Examples of using the IPython prompt</title>
         <author>ezalavra</author>
         <link>https://padlet.com/ezalavra/yfyv643jg8vu/wish/327067553</link>
         <description><![CDATA[<pre>In [1]: 16**0.5
Out[1]: 4.0
In [2]: import math
In [3]: math.sqrt(16)
Out[3]: 4.0</pre><div><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2019-02-03 15:54:44 UTC</pubDate>
         <guid>https://padlet.com/ezalavra/yfyv643jg8vu/wish/327067553</guid>
      </item>
      <item>
         <title>Handle Errors</title>
         <author>ezalavra</author>
         <link>https://padlet.com/ezalavra/yfyv643jg8vu/wish/327070436</link>
         <description><![CDATA[<div><br><mark>Infinite loops in your programs </mark></div><div>If you <strong>accidentally created an infinite loop</strong> and your program sits for a few seconds without printing anything out or terminating, restart the console.<br>You can do this in Spyder by hitting Ctrl + c (Ctrl key and the c button on your keyboard) in the console. Or go to the button beside the red square at the top of your console and select Restart Kernel. If this doesn't work, restart Anaconda/Spyder.<br>You can do this in IDLE by clicking Ctrl + F6 or by going to the menu Shell -&gt; Restart Shell</div>]]></description>
         <enclosure url="" />
         <pubDate>2019-02-03 16:18:11 UTC</pubDate>
         <guid>https://padlet.com/ezalavra/yfyv643jg8vu/wish/327070436</guid>
      </item>
      <item>
         <title>Algorithm</title>
         <author>ezalavra</author>
         <link>https://padlet.com/ezalavra/yfyv643jg8vu/wish/327076851</link>
         <description><![CDATA[]]></description>
         <enclosure url="https://padlet-uploads.storage.googleapis.com/77135430/f8e6e1782107faff730115bc2c618d69/algorithm.jpg" />
         <pubDate>2019-02-03 17:08:03 UTC</pubDate>
         <guid>https://padlet.com/ezalavra/yfyv643jg8vu/wish/327076851</guid>
      </item>
      <item>
         <title>Semantics</title>
         <author>ezalavra</author>
         <link>https://padlet.com/ezalavra/yfyv643jg8vu/wish/327086280</link>
         <description><![CDATA[<div>Semantics is the meaning associated with that syntactically correct string of symbols with no semantic errors.<br><mark>Syntax </mark>= Determines whether a string is legal  <br><mark>Semantics</mark> = Assigns a meaning to a legal sentence<br><mark>Static semantics</mark> = Determines whether a string has meaning</div><div><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2019-02-03 18:16:10 UTC</pubDate>
         <guid>https://padlet.com/ezalavra/yfyv643jg8vu/wish/327086280</guid>
      </item>
      <item>
         <title>Python Program</title>
         <author>ezalavra</author>
         <link>https://padlet.com/ezalavra/yfyv643jg8vu/wish/327088033</link>
         <description><![CDATA[]]></description>
         <enclosure url="https://padlet-uploads.storage.googleapis.com/77135430/643b31d797278bde0a8eb4521ff80e67/python_program.jpg" />
         <pubDate>2019-02-03 18:29:20 UTC</pubDate>
         <guid>https://padlet.com/ezalavra/yfyv643jg8vu/wish/327088033</guid>
      </item>
      <item>
         <title>Operations Precedence</title>
         <author>ezalavra</author>
         <link>https://padlet.com/ezalavra/yfyv643jg8vu/wish/327089626</link>
         <description><![CDATA[<div>1. **(^)<br>2. *,  /, //(div), %(mod)<br>3. +, -<br>left to right</div>]]></description>
         <enclosure url="" />
         <pubDate>2019-02-03 18:41:49 UTC</pubDate>
         <guid>https://padlet.com/ezalavra/yfyv643jg8vu/wish/327089626</guid>
      </item>
      <item>
         <title>Scalar Objects</title>
         <author>ezalavra</author>
         <link>https://padlet.com/ezalavra/yfyv643jg8vu/wish/327090077</link>
         <description><![CDATA[<div>int<br>float<br>bool<br>nonetype<br>str</div>]]></description>
         <enclosure url="" />
         <pubDate>2019-02-03 18:45:37 UTC</pubDate>
         <guid>https://padlet.com/ezalavra/yfyv643jg8vu/wish/327090077</guid>
      </item>
      <item>
         <title>Comparisons</title>
         <author>ezalavra</author>
         <link>https://padlet.com/ezalavra/yfyv643jg8vu/wish/327096956</link>
         <description><![CDATA[<div>&gt;, &gt;=<br>&lt;, &lt;=<br>==, !=</div>]]></description>
         <enclosure url="" />
         <pubDate>2019-02-03 19:36:26 UTC</pubDate>
         <guid>https://padlet.com/ezalavra/yfyv643jg8vu/wish/327096956</guid>
      </item>
      <item>
         <title>Branching</title>
         <author>ezalavra</author>
         <link>https://padlet.com/ezalavra/yfyv643jg8vu/wish/327099965</link>
         <description><![CDATA[]]></description>
         <enclosure url="https://padlet-uploads.storage.googleapis.com/77135430/4f3bf1a41c5cd9fb38e78e8b35e60347/branching.jpg" />
         <pubDate>2019-02-03 19:58:01 UTC</pubDate>
         <guid>https://padlet.com/ezalavra/yfyv643jg8vu/wish/327099965</guid>
      </item>
      <item>
         <title>Strings</title>
         <author>ezalavra</author>
         <link>https://padlet.com/ezalavra/yfyv643jg8vu/wish/327109750</link>
         <description><![CDATA[<div>x="helen"<br>len(x)<br>x[0] , x[1:3], x[:3], x[1:], x[:]<br>x[:-1] , χ[0:4:2] , χ[::-1]<br>'hel' in x<br>print(s[::-1]) for reverse<br>strings are immutable <br>s='x'+s[1:len(s)] e.g. to change the 1st letter</div>]]></description>
         <enclosure url="" />
         <pubDate>2019-02-03 21:06:09 UTC</pubDate>
         <guid>https://padlet.com/ezalavra/yfyv643jg8vu/wish/327109750</guid>
      </item>
      <item>
         <title>Input/Output</title>
         <author>ezalavra</author>
         <link>https://padlet.com/ezalavra/yfyv643jg8vu/wish/327353815</link>
         <description><![CDATA[<div>print(x)<br>print("number",x)<br>print("number"+x)<br>x=input()<br>x=input("enter sth")<br>***input returns a string so for other types we do:<br>=int(input('give number'))<br><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2019-02-04 15:35:59 UTC</pubDate>
         <guid>https://padlet.com/ezalavra/yfyv643jg8vu/wish/327353815</guid>
      </item>
      <item>
         <title>Loops</title>
         <author>ezalavra</author>
         <link>https://padlet.com/ezalavra/yfyv643jg8vu/wish/327373364</link>
         <description><![CDATA[<div>n=0<br><mark>while n &lt; 5:</mark><br>    print(n)<br>    n = n + 1<br><mark>for n in range (5):</mark><br>    print(n)<br>** range(5) gives 0..4<br>for n in range (1,5,2)<br>** start:end+1:step<br>sum = 0<br>for n in range(1,5):<br>    sum = sum + n <br>ή <mark>sum +=n</mark><br>    print (n, sum)<br><strong><mark>break</mark></strong><strong> </strong>get out of the loop<br><mark>for char in s: </mark>(for strings)<br><br></div>]]></description>
         <enclosure url="https://padlet-uploads.storage.googleapis.com/77135430/c17ee5105038507da3a7c065aaa14363/for_vs_while.jpg" />
         <pubDate>2019-02-04 16:09:02 UTC</pubDate>
         <guid>https://padlet.com/ezalavra/yfyv643jg8vu/wish/327373364</guid>
      </item>
      <item>
         <title>Floats (implications)</title>
         <author>ezalavra</author>
         <link>https://padlet.com/ezalavra/yfyv643jg8vu/wish/329516898</link>
         <description><![CDATA[<div>due to their conversion in binary it is better to compare:<br>abs(x-y)&lt;small number<br>than x==y<br><br><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2019-02-09 18:42:16 UTC</pubDate>
         <guid>https://padlet.com/ezalavra/yfyv643jg8vu/wish/329516898</guid>
      </item>
      <item>
         <title>FUNCTION</title>
         <author>ezalavra</author>
         <link>https://padlet.com/ezalavra/yfyv643jg8vu/wish/329522610</link>
         <description><![CDATA[<div>Used to encapsulate pieces of computation.<br>Gives 2 important aspects of computational thinking: 1. decomposition (modularity) = break the problem into small, self-contained pieces<br>2. abstraction - suppress  details of method to compute sth, just use it<br><mark>Ways to call a function<br></mark>e.g. for f(x,y,z)<br>f(5,3,True)<br>f(x=5,y=3,z=True)<br>f(z=False, x=5, y=3) I can change order if I specify the name of the parameter<br>e.g. for f(x,y,z=True) I can call it f(5,3)<br><br></div>]]></description>
         <enclosure url="https://padlet-uploads.storage.googleapis.com/77135430/33c75ae5ac763e777b2b6f71e0f1049d/function.jpg" />
         <pubDate>2019-02-09 19:41:38 UTC</pubDate>
         <guid>https://padlet.com/ezalavra/yfyv643jg8vu/wish/329522610</guid>
      </item>
      <item>
         <title>Object Methods</title>
         <author>ezalavra</author>
         <link>https://padlet.com/ezalavra/yfyv643jg8vu/wish/329569598</link>
         <description><![CDATA[<div>The convention for object methods is to use the "dot" notation, so that if s is a string, evaluating <mark>s.upper </mark>will return the actual function, and evaluating <mark>s.upper() </mark>will cause the function itself to be evaluated (in this case it returns a new string, since strings are immutable) with every character now in upper case. <br>EXAMPLES<br>s.upper() s.capitalize()<br>s.lower() swapcase()<br>s.isupper() s.islower() <br>s.index('e') s.find('n')<br>s.count('e') <br>s.replace('e', '*') </div>]]></description>
         <enclosure url="" />
         <pubDate>2019-02-10 08:46:13 UTC</pubDate>
         <guid>https://padlet.com/ezalavra/yfyv643jg8vu/wish/329569598</guid>
      </item>
      <item>
         <title>RECURSION</title>
         <author>ezalavra</author>
         <link>https://padlet.com/ezalavra/yfyv643jg8vu/wish/329574576</link>
         <description><![CDATA[<div>If I have one or more base cases that are really easy to solve, and can be solved directly, then I can solve a problem by reducing it to a solution to a simpler version of the same problem until I get down to a simple base case.</div>]]></description>
         <enclosure url="https://padlet-uploads.storage.googleapis.com/77135430/d8041cda44222efe7c84bcb202109284/recursice_function.jpg" />
         <pubDate>2019-02-10 09:53:08 UTC</pubDate>
         <guid>https://padlet.com/ezalavra/yfyv643jg8vu/wish/329574576</guid>
      </item>
      <item>
         <title>Iteration vs Recursion</title>
         <author>ezalavra</author>
         <link>https://padlet.com/ezalavra/yfyv643jg8vu/wish/329653532</link>
         <description><![CDATA[]]></description>
         <enclosure url="https://padlet-uploads.storage.googleapis.com/77135430/9bc14aa790c74a803a003d91793b11f1/iteration_vs_recursion.jpg" />
         <pubDate>2019-02-10 20:52:35 UTC</pubDate>
         <guid>https://padlet.com/ezalavra/yfyv643jg8vu/wish/329653532</guid>
      </item>
      <item>
         <title>Towers of Hanoi</title>
         <author>ezalavra</author>
         <link>https://padlet.com/ezalavra/yfyv643jg8vu/wish/329859397</link>
         <description><![CDATA[]]></description>
         <enclosure url="https://padlet-uploads.storage.googleapis.com/77135430/ecc1566eb67bfdd086a6e3cb312b1782/towers_of_hanoi.jpg" />
         <pubDate>2019-02-11 14:11:54 UTC</pubDate>
         <guid>https://padlet.com/ezalavra/yfyv643jg8vu/wish/329859397</guid>
      </item>
      <item>
         <title>MODULE</title>
         <author>ezalavra</author>
         <link>https://padlet.com/ezalavra/yfyv643jg8vu/wish/330558431</link>
         <description><![CDATA[<div>a Python <mark>file </mark>that has something with a <mark>.py </mark>extension to it that's a collection of Python definitions of statements.<br>To use it:<br><mark>import</mark> modulename<br>print(modulename.x)<br>print(modulename,def(3))<br>If I know that the names in that module don't collide with things then:<br><mark>from </mark>modulename import *</div>]]></description>
         <enclosure url="" />
         <pubDate>2019-02-12 20:36:36 UTC</pubDate>
         <guid>https://padlet.com/ezalavra/yfyv643jg8vu/wish/330558431</guid>
      </item>
      <item>
         <title>FILE Handle</title>
         <author>ezalavra</author>
         <link>https://padlet.com/ezalavra/yfyv643jg8vu/wish/330563093</link>
         <description><![CDATA[<div>namehandle=open('nametest','w')<br>for i in range(5):<br>    name=input('Give the name ')<br>    namehandle.write(name + '\n')<br>namehandle.close()<br>namehandle=open('nametest','r')<br>for line in namehandle:<br>    print (line)<br>namehandle.close()</div>]]></description>
         <enclosure url="" />
         <pubDate>2019-02-12 20:46:09 UTC</pubDate>
         <guid>https://padlet.com/ezalavra/yfyv643jg8vu/wish/330563093</guid>
      </item>
      <item>
         <title>Grouping Data: Tuples </title>
         <author>ezalavra</author>
         <link>https://padlet.com/ezalavra/yfyv643jg8vu/wish/332086530</link>
         <description><![CDATA[<div>A <mark>tuple </mark>is an ordered sequence of elements which can include any different kind of element within them.<br>A tuple is <strong><mark>not mutable</mark></strong>. I can't change the values of its elements.<br>t=()  to declare<br>t=(1, 'two', 3)<br>t[1]  use index to refer to the value <br>t=t+('four', 5)<br>They are immutable. I cannot do e.g t[2]=3<br>t[1:2] gives ('two',) the extra comma means a tuple with one element<br>USING TUPLES<br>- swap (x,y)=(y,x)<br>- return more results from functions, return(x,y)<br><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2019-02-17 09:38:28 UTC</pubDate>
         <guid>https://padlet.com/ezalavra/yfyv643jg8vu/wish/332086530</guid>
      </item>
      <item>
         <title>Grouping data: Lists</title>
         <author>ezalavra</author>
         <link>https://padlet.com/ezalavra/yfyv643jg8vu/wish/332697384</link>
         <description><![CDATA[<div>A <mark>list i</mark>s an ordered sequence of information, accessible by an index.<br>A list is <strong><mark>mutable</mark></strong><strong>.</strong> I can go in and change the element of a list to be something different.<br>L[] to declare<br>L=(1, 'two', 3)<br>L[0] to refer to the value of the 1st element<br>len(L)<br>L[1]=5  to <strong>change value</strong></div><div><mark>L.append</mark>[3] to add (only) one element<br><mark>L.extend</mark>([6,9])<br><mark>del(L[2])</mark> to delete element at a specific index<br><mark>L.pop()</mark> remove last element and return it <br>L.pop(2) remove 3rd element and return it<br><mark>L.remove(2)</mark> remove the 1st instance of the specific element (return error if the element is not in the list)<br><mark>list(stringname)</mark> to convert a string to a list<br><mark>s.split(5)</mark> convert a string to a list with two elements &lt;before and after the chosen one)<br><mark>"".join(L)</mark> creates a string by joining the elements of a list.<br><mark>L.sort() </mark>to sort a list and change it<br><mark>sorted[L]</mark> to get a new shorted version of the list'<br><mark>L.reverse() </mark>to reverse a list and change it<br><mark>L.index(1)</mark> finds where it first occurs<br><mark>listA.count(4) </mark>counts how many times the element 4 occurs in the list<br><strong><mark>L2=L creates the alias L2</mark></strong> copying elements form L. Alias L2 changes when L changes<br><strong><mark>L3=L[:] creates the clone L3</mark></strong> copying elements form L. Clone L3 doesn't change according to L<br>L2<mark>==</mark>L3 checks elements , L2 <mark>is</mark> L3 checks identity to see if it is alias<br><br><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2019-02-19 14:35:44 UTC</pubDate>
         <guid>https://padlet.com/ezalavra/yfyv643jg8vu/wish/332697384</guid>
      </item>
      <item>
         <title>Object Oriented</title>
         <author>ezalavra</author>
         <link>https://padlet.com/ezalavra/yfyv643jg8vu/wish/332755523</link>
         <description><![CDATA[<div>Everything in Python, or almost everything in Python, is an <strong><mark>object.</mark></strong></div><div>Objects have data inside of them but they also <mark>have methods and functions.</mark> And we get to that by using that <strong>dot.  <br></strong>object<strong>.</strong>dosomething()<strong><br></strong>E.g. L.append['f'] </div>]]></description>
         <enclosure url="" />
         <pubDate>2019-02-19 15:59:43 UTC</pubDate>
         <guid>https://padlet.com/ezalavra/yfyv643jg8vu/wish/332755523</guid>
      </item>
      <item>
         <title>Functions as objects</title>
         <author>ezalavra</author>
         <link>https://padlet.com/ezalavra/yfyv643jg8vu/wish/332861499</link>
         <description><![CDATA[<div>E.g. Apply a function to each element of a list<br>def applyelem(L, f):<br>   for i in range(len(L)):<br>         L[i]=f(L[i])<br>L=[1, 4, -9, -3]<br>applyelem(L, abs)<br>E.g. Apply functions as lists<br>def applyfun(L, x):<br>   for i in L<br>       print (i(x))<br>L=[abs, int]<br>applyfun(L, -9.0</div>]]></description>
         <enclosure url="https://padlet-uploads.storage.googleapis.com/77135430/c0ddbc1999c1062e580dfdff842d3c10/functions_as_objects.jpg" />
         <pubDate>2019-02-19 18:43:31 UTC</pubDate>
         <guid>https://padlet.com/ezalavra/yfyv643jg8vu/wish/332861499</guid>
      </item>
      <item>
         <title>Dictionaries</title>
         <author>ezalavra</author>
         <link>https://padlet.com/ezalavra/yfyv643jg8vu/wish/333194042</link>
         <description><![CDATA[<div>Data structure that stores pair of data.<br> <mark>key</mark><strong><mark>:</mark></strong><mark>value</mark>  key must be unique and of  immutable type (int,float,string,tuple,bool)<br>d{} to declare, e.g. <br>d={'Ana':12, "Bill":19}<br>'chris' in D   to check<br>d['sylvie']=17 to add entry<br>del (d['john']) to delete an entry<br>d.keys() to get the keys<br>d.values() to get the values<br>len(d['Ana']) to get the length of its value</div>]]></description>
         <enclosure url="" />
         <pubDate>2019-02-20 14:43:16 UTC</pubDate>
         <guid>https://padlet.com/ezalavra/yfyv643jg8vu/wish/333194042</guid>
      </item>
      <item>
         <title></title>
         <author>ezalavra</author>
         <link>https://padlet.com/ezalavra/yfyv643jg8vu/wish/337240228</link>
         <description><![CDATA[<div>How do I test my code?And when it doesn't work the way I expected it to, how do I go about debugging it?</div>]]></description>
         <enclosure url="https://padlet-uploads.storage.googleapis.com/77135430/b6d5adf54a15f5541517ed729a451f6f/Defensive_programming.jpg" />
         <pubDate>2019-03-03 16:26:48 UTC</pubDate>
         <guid>https://padlet.com/ezalavra/yfyv643jg8vu/wish/337240228</guid>
      </item>
      <item>
         <title></title>
         <author>ezalavra</author>
         <link>https://padlet.com/ezalavra/yfyv643jg8vu/wish/337246574</link>
         <description><![CDATA[<div><mark>1)</mark> design your code so that it easily supports testing and debugging. E.g. break the program up into simple modules, self-contained modules, that can be easily tested and debugged individually.<br><mark>2) </mark>Write document constraints on the modules for e.g. expected input/output.<br><mark>3)</mark> document the assumptions about code design. (thinking process when created this code)</div>]]></description>
         <enclosure url="https://padlet-uploads.storage.googleapis.com/77135430/2b3ca74a938256faba7b3d96db9d092d/Classes_of_tests.jpg" />
         <pubDate>2019-03-03 17:18:14 UTC</pubDate>
         <guid>https://padlet.com/ezalavra/yfyv643jg8vu/wish/337246574</guid>
      </item>
      <item>
         <title>Black Box testing</title>
         <author>ezalavra</author>
         <link>https://padlet.com/ezalavra/yfyv643jg8vu/wish/337249392</link>
         <description><![CDATA[<div>A method of software testing that tests the <em>functionality</em> of an application. A way to think about black-box testing is to look at both:</div><ul><li>The possible paths through the specification.</li><li>The possible boundary cases.</li></ul>]]></description>
         <enclosure url="https://padlet-uploads.storage.googleapis.com/77135430/7418f8c3d5b24e52ed9cc3f0ab50a9ea/black_box_testing.jpg" />
         <pubDate>2019-03-03 17:41:01 UTC</pubDate>
         <guid>https://padlet.com/ezalavra/yfyv643jg8vu/wish/337249392</guid>
      </item>
      <item>
         <title>Glass Box Testing</title>
         <author>ezalavra</author>
         <link>https://padlet.com/ezalavra/yfyv643jg8vu/wish/337250515</link>
         <description><![CDATA[<div>A path-complete glass box test suite would find test cases that go through every possible path in the code. This is different from black-box testing, because in black-box testing you only have the function specification. For glass-box testing, you actually know how the function you are testing is defined. Thus you can use this definition to figure out how many different paths through the code exist, and then pick a test suite based on that knowledge.</div>]]></description>
         <enclosure url="https://padlet-uploads.storage.googleapis.com/77135430/7cbde6cc329c5a037efe99a015cdba67/glass_box_testing.jpg" />
         <pubDate>2019-03-03 17:49:09 UTC</pubDate>
         <guid>https://padlet.com/ezalavra/yfyv643jg8vu/wish/337250515</guid>
      </item>
      <item>
         <title>Categories of Bugs</title>
         <author>ezalavra</author>
         <link>https://padlet.com/ezalavra/yfyv643jg8vu/wish/337257382</link>
         <description><![CDATA[]]></description>
         <enclosure url="https://padlet-uploads.storage.googleapis.com/77135430/476bd27d2e312695aa9e9ac152ede986/categories_of_bugs.jpg" />
         <pubDate>2019-03-03 18:38:24 UTC</pubDate>
         <guid>https://padlet.com/ezalavra/yfyv643jg8vu/wish/337257382</guid>
      </item>
      <item>
         <title>Dealing with Exceptions</title>
         <author>ezalavra</author>
         <link>https://padlet.com/ezalavra/yfyv643jg8vu/wish/337266440</link>
         <description><![CDATA[<div><mark>try:<br></mark>    code I want to try<mark><br>except:<br></mark>    print ('error')<br><br><mark>else:<br>finally:</mark></div>]]></description>
         <enclosure url="https://padlet-uploads.storage.googleapis.com/77135430/834393029449f375d83b7f644ba63b7c/handling_excpetions.jpg" />
         <pubDate>2019-03-03 19:51:26 UTC</pubDate>
         <guid>https://padlet.com/ezalavra/yfyv643jg8vu/wish/337266440</guid>
      </item>
      <item>
         <title>Types pf exceptions</title>
         <author>ezalavra</author>
         <link>https://padlet.com/ezalavra/yfyv643jg8vu/wish/338852505</link>
         <description><![CDATA[<div>except ValueError:<br>except IOError:<br>except ZeroDivisionError:<br><br><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2019-03-07 14:03:47 UTC</pubDate>
         <guid>https://padlet.com/ezalavra/yfyv643jg8vu/wish/338852505</guid>
      </item>
      <item>
         <title>Flow control with Exceptions</title>
         <author>ezalavra</author>
         <link>https://padlet.com/ezalavra/yfyv643jg8vu/wish/338871671</link>
         <description><![CDATA[<div><mark>raise</mark> &lt;exception_name&gt; (&lt;arguments&gt;</div>]]></description>
         <enclosure url="https://padlet-uploads.storage.googleapis.com/77135430/87b855a2ab7993acab666c293e89c87f/Exceptions_as_flow_control.jpg" />
         <pubDate>2019-03-07 14:37:26 UTC</pubDate>
         <guid>https://padlet.com/ezalavra/yfyv643jg8vu/wish/338871671</guid>
      </item>
      <item>
         <title>Assertions</title>
         <author>ezalavra</author>
         <link>https://padlet.com/ezalavra/yfyv643jg8vu/wish/338927242</link>
         <description><![CDATA[<div>For <strong>good defensive programming.<br></strong>I do an assertion that the following should be true, and if it's not, raise an <strong>exception</strong>. e.g <br>def avg(grades):<br>    assert not len(grades)==0, 'no data'<br>    return sum(grades)/len(grades)<br>Use assertions to check: <br>1. types of arguments or values<br>2. that invariants on data structure are met<br>3. constrains on return values<br>4. violations of constrains on procedures</div>]]></description>
         <enclosure url="" />
         <pubDate>2019-03-07 16:02:22 UTC</pubDate>
         <guid>https://padlet.com/ezalavra/yfyv643jg8vu/wish/338927242</guid>
      </item>
      <item>
         <title>Objects</title>
         <author>ezalavra</author>
         <link>https://padlet.com/ezalavra/yfyv643jg8vu/wish/340433027</link>
         <description><![CDATA[<div>All the primitiveobjects have:<br>1. a <mark>type</mark><br>2. an <mark>internal data representation</mark>.<br>3. associated with it, it has a <mark>set of procedures </mark>that allow you to interact with an instance of that object.</div>]]></description>
         <enclosure url="https://padlet-uploads.storage.googleapis.com/77135430/ee3955f29ae0d3f9e84b19fe9801f0f1/objects.jpg" />
         <pubDate>2019-03-12 14:27:59 UTC</pubDate>
         <guid>https://padlet.com/ezalavra/yfyv643jg8vu/wish/340433027</guid>
      </item>
      <item>
         <title>Object Oriented Programming</title>
         <author>ezalavra</author>
         <link>https://padlet.com/ezalavra/yfyv643jg8vu/wish/340439122</link>
         <description><![CDATA[<div>Each object is a data abstraction. It captures an internal representation of the data attributes and it defines an interface for interacting with the object through methods.</div><div><br></div>]]></description>
         <enclosure url="https://padlet-uploads.storage.googleapis.com/77135430/98b8a1b8618980e09ae628606af98583/Object_Oriented_Programming.jpg" />
         <pubDate>2019-03-12 14:37:20 UTC</pubDate>
         <guid>https://padlet.com/ezalavra/yfyv643jg8vu/wish/340439122</guid>
      </item>
      <item>
         <title>How to manipulate Lists</title>
         <author>ezalavra</author>
         <link>https://padlet.com/ezalavra/yfyv643jg8vu/wish/340443036</link>
         <description><![CDATA[<div>L[i], L[i:j], L[i,j,k], +<br>len(), max(), min(), del(l[i])<br>L.append(),  L.extend(),  L.count(), L.index()<br>L.insert(), L.pop(),  L.remove(), L.sort(), <br>L.reverse()</div>]]></description>
         <enclosure url="" />
         <pubDate>2019-03-12 14:43:25 UTC</pubDate>
         <guid>https://padlet.com/ezalavra/yfyv643jg8vu/wish/340443036</guid>
      </item>
      <item>
         <title>Defining a Class</title>
         <author>ezalavra</author>
         <link>https://padlet.com/ezalavra/yfyv643jg8vu/wish/340463622</link>
         <description><![CDATA[<div>class name (object):<br>     &lt;attributes&gt;<br>Attibutes can be:<br>-  data and procedures that "belong" to the class.<br>- data attributes<br>- procedural attributes (methods<br><br><br></div>]]></description>
         <enclosure url="https://padlet-uploads.storage.googleapis.com/77135430/7b5d9679471c5b723341491b7ca16da4/creating_claSS.jpg" />
         <pubDate>2019-03-12 15:16:33 UTC</pubDate>
         <guid>https://padlet.com/ezalavra/yfyv643jg8vu/wish/340463622</guid>
      </item>
      <item>
         <title>Create an instance of a class</title>
         <author>ezalavra</author>
         <link>https://padlet.com/ezalavra/yfyv643jg8vu/wish/340479974</link>
         <description><![CDATA[<div>class Coordinate(object):<br>    def __init__(self, x, y):<br>        self.x=x<br>        self.y=y<br>έτσι στην συνέχεια έχω στον compiler:<br>c=Coordinate(3,4)<br>b=Coordinate(0,0)<br>print(c.x) μου δίνει 3<br>print(b.x) μου δίνει 0<br>Δηλαδή μου δίνει το instance των δεδομένων που είχα κάθε φορά.</div>]]></description>
         <enclosure url="" />
         <pubDate>2019-03-12 15:43:05 UTC</pubDate>
         <guid>https://padlet.com/ezalavra/yfyv643jg8vu/wish/340479974</guid>
      </item>
      <item>
         <title>Create a method of a class</title>
         <author>ezalavra</author>
         <link>https://padlet.com/ezalavra/yfyv643jg8vu/wish/340493985</link>
         <description><![CDATA[<div>a method is like a function but it only works in the class<br>class Coordinate(object):<br>    def distance(self, other):<br>     x_diff_sq=(self.x-other.x)**2<br>     y_diff_sq=(self.y-other.y)**2<br>     return (x_diff_sq + y_diff_sq)**0.5</div>]]></description>
         <enclosure url="" />
         <pubDate>2019-03-12 16:05:24 UTC</pubDate>
         <guid>https://padlet.com/ezalavra/yfyv643jg8vu/wish/340493985</guid>
      </item>
      <item>
         <title>How to use a method of class</title>
         <author>ezalavra</author>
         <link>https://padlet.com/ezalavra/yfyv643jg8vu/wish/340498307</link>
         <description><![CDATA[<div>c=Coordinate(3,4)<br>b=Coordinate(0,0)<br>print(c.distance(b))<br><br>alternative way: <br>c=Coordinate(3,4)<br>b=Coordinate(0,0)<br>print(Coordinate.distance(c,b))</div>]]></description>
         <enclosure url="https://padlet-uploads.storage.googleapis.com/77135430/a10ea89dcfbe85b1d7130632850b9669/use_a_method_of_a_class.jpg" />
         <pubDate>2019-03-12 16:13:39 UTC</pubDate>
         <guid>https://padlet.com/ezalavra/yfyv643jg8vu/wish/340498307</guid>
      </item>
      <item>
         <title>How to nicely print a data object</title>
         <author>ezalavra</author>
         <link>https://padlet.com/ezalavra/yfyv643jg8vu/wish/340513651</link>
         <description><![CDATA[<div>class Coordinate(object):<br>   def __init__(self, x, y):<br>      self.x=x<br>      self.y=y<br>def __str__(self):<br> return "&lt;"+str(self.x)+","+str(self.y)+"&gt;"</div>]]></description>
         <enclosure url="" />
         <pubDate>2019-03-12 16:39:05 UTC</pubDate>
         <guid>https://padlet.com/ezalavra/yfyv643jg8vu/wish/340513651</guid>
      </item>
      <item>
         <title>How to check classes</title>
         <author>ezalavra</author>
         <link>https://padlet.com/ezalavra/yfyv643jg8vu/wish/340516544</link>
         <description><![CDATA[<div><mark>type(c)</mark> to check the type of an object instance<br><mark>isinstance(Coordinate,c)</mark> to check if c is an object of the class Coordinate</div>]]></description>
         <enclosure url="" />
         <pubDate>2019-03-12 16:44:19 UTC</pubDate>
         <guid>https://padlet.com/ezalavra/yfyv643jg8vu/wish/340516544</guid>
      </item>
      <item>
         <title>How to </title>
         <author>ezalavra</author>
         <link>https://padlet.com/ezalavra/yfyv643jg8vu/wish/340527549</link>
         <description><![CDATA[]]></description>
         <enclosure url="" />
         <pubDate>2019-03-12 17:03:55 UTC</pubDate>
         <guid>https://padlet.com/ezalavra/yfyv643jg8vu/wish/340527549</guid>
      </item>
      <item>
         <title>How to use classes with operators</title>
         <author>ezalavra</author>
         <link>https://padlet.com/ezalavra/yfyv643jg8vu/wish/340527558</link>
         <description><![CDATA[<div>class Coordinate(object):<br>   def __init__(self, x, y):<br>        self.x=x<br>        self.y=y<br>   def __sub__(self, other):<br>        return Coordinate(self.x-other.x, self.y-other.y)<br>c=Coordinate(3,4)<br>b=Coordinate(0,<br>print (c-b)</div>]]></description>
         <enclosure url="https://padlet-uploads.storage.googleapis.com/77135430/9b127d04d214f5c4e75613b5d23471d1/special_operators.jpg" />
         <pubDate>2019-03-12 17:03:55 UTC</pubDate>
         <guid>https://padlet.com/ezalavra/yfyv643jg8vu/wish/340527558</guid>
      </item>
      <item>
         <title>The power of OOP</title>
         <author>ezalavra</author>
         <link>https://padlet.com/ezalavra/yfyv643jg8vu/wish/340671782</link>
         <description><![CDATA[<div>- bundle together objects that share some common properties:</div><ol><li>they share common attributes, </li><li>they share procedures that operate on those attributes.</li></ol><div>- <mark>abstraction = </mark>make a distinction between how to implement the object and how to use it.<br>- I don't have to think about the internal representation. I don't have to think about the details of how to get at it. I simply know that there are a set of methods associated with it. =&gt; I <mark>build layers of abstractions </mark>that are going to inherit from other classes of objects.<br>-  I build <mark>my own class of objects</mark> on top of Python objects.</div><div><br></div>]]></description>
         <enclosure url="https://padlet-uploads.storage.googleapis.com/77135430/10f28c72d4a95eed803e7e5f6ef87cb0/class_definition_vs_instance_of_a_class.jpg" />
         <pubDate>2019-03-13 00:33:03 UTC</pubDate>
         <guid>https://padlet.com/ezalavra/yfyv643jg8vu/wish/340671782</guid>
      </item>
      <item>
         <title>Hierarchy</title>
         <author>ezalavra</author>
         <link>https://padlet.com/ezalavra/yfyv643jg8vu/wish/341023911</link>
         <description><![CDATA[<div>I build classes that reflect hierarchy, i.e. sharing the properties and the methods that a re common, but having distinct properties, attributes, methods when appropriate.<br>     <mark>parent class (</mark>superclass)<br>doesnot have access to data and methods of its subclasses<br>        <mark>child class</mark> (subclass) inherits all data and behavor from its parent class but can also:<br>- add info    - add behavior    - override behavior<br><br><mark>class Animal(object):</mark><br>    def __init__(self, age):<br>        self.age=age<br>        self.name=None<br><mark>class cat(Animal):</mark><br>    # add new functionality with speak()<br>    def speak(self):<br>        print("meau")<br>    def __str__(self):<br>        return "cat: "+str(self.name)<br><mark>class person(Animal):</mark><br>    def __init__(self, name, age):<br>        Animal.__init__(self, age)<br>        Animal.set_name(self, name)<br>        self.friends=[]<br>    def get_friends(self):<br>        return self.friends<br>    def add_friend(self, fname):<br>        if fname not in self.friends:<br>            self.friends.append(fname)<br>    def speak(self)        :<br>        print("hello guys")<br><mark>class student(person):</mark><br>    def __init__(self, name, age, major=None):<br>        person.__init__(self, name, age)<br>        self.major=major<br>    def change_major(self, major):    <br>        self.major=major<br><br><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2019-03-13 18:13:29 UTC</pubDate>
         <guid>https://padlet.com/ezalavra/yfyv643jg8vu/wish/341023911</guid>
      </item>
      <item>
         <title>Instance variable VS Class variables </title>
         <author>ezalavra</author>
         <link>https://padlet.com/ezalavra/yfyv643jg8vu/wish/341076774</link>
         <description><![CDATA[<div><strong>Instance variables</strong> are:<br>- specific to an instance<br>- created for an istance/belong to an instance<br>- use the generic variable name <mark>self<br></mark><strong>Class Variables </strong>are:<br>- belong to the class<br>- defined inside the class /outside its methods<br>- shared among objects/instances of that class<br><br>class Animal(object):<br>    def __init__(self, age):<br>        <mark>self.age=age<br>        self.name=None</mark><br>class rabbit(Animal):<br>  <mark>  tag=1</mark><br>    def __init__(self, age, parent1=None, parent2=None):<br>        Animal.__init__(self, age)<br>        self.parent1=parent1<br>        self.parent2=parent2<br>        self.rid=rabbit.tag<br>       <mark> rabbit.tag+=1</mark><br>    def get_rid(self):<br>        return str(self.rid).zfill(3)<br>    def get_parent1(self):<br>        return self.parent1<br>    def get_parent2(self):<br>        return self.parent2<br><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2019-03-13 20:14:59 UTC</pubDate>
         <guid>https://padlet.com/ezalavra/yfyv643jg8vu/wish/341076774</guid>
      </item>
      <item>
         <title>Generators</title>
         <author>ezalavra</author>
         <link>https://padlet.com/ezalavra/yfyv643jg8vu/wish/341431718</link>
         <description><![CDATA[<div>def genFib():<br>    fibn_1=1<br>    fibn_2=0<br>    while True:<br>        next=fibn_1+fibn_2<br>        yield next<br>        fibn_2=fibn_1<br>        fibn_1=next<br>to test it:<br>f=genFib()<br>for i in range (5):<br>    print(f.__next__())     <br><br><br>I can use for returning one by one value</div>]]></description>
         <enclosure url="https://padlet-uploads.storage.googleapis.com/77135430/41e10a1e4485f9688bcdd81ea0730329/generators.jpg" />
         <pubDate>2019-03-14 16:52:06 UTC</pubDate>
         <guid>https://padlet.com/ezalavra/yfyv643jg8vu/wish/341431718</guid>
      </item>
      <item>
         <title>Program Efficiency</title>
         <author>ezalavra</author>
         <link>https://padlet.com/ezalavra/yfyv643jg8vu/wish/342005265</link>
         <description><![CDATA[<div>fast computer fast VS large datasets<br>Efficiency of <mark>time </mark>and of <mark>space<br></mark>How to evaluate efficiency?<br>1) measure with timer<br>2) count the operations<br>3) abstract notion of order of growth<mark><br>TIMING A PROGRAM (example)</mark><br>import time<br>def celcius_farhenait(c):<br>    return c*9/5+32<br>t0=time.clock()<br>celcius_farhenait(40)<br>t1=time.clock()<br>print(t1-t0)<br>BUT timing programs is incosistent <br><mark>COUNTING OPERATIONS OF A PROGRAM (example)</mark><br>-  mathematical operations<br>- comparisons<br>- assignement<br>- assessing objects in memory<br><mark>ORDERS OF GROWTH TO EVALUATE THE EFFICENCY OF THE PROGRAM</mark><br>- check for very big input<br>- growth of program's runtime as input gets bigger<br>- put an upper bound on growth<br>- express "order of growth" not "exact"</div>]]></description>
         <enclosure url="https://padlet-uploads.storage.googleapis.com/77135430/48046ec3ed5fe58ed7b19fd2ab240372/types_of_orders_of_growth.jpg" />
         <pubDate>2019-03-16 13:42:02 UTC</pubDate>
         <guid>https://padlet.com/ezalavra/yfyv643jg8vu/wish/342005265</guid>
      </item>
      <item>
         <title>Measuring order of Growth - Big O Notation</title>
         <author>ezalavra</author>
         <link>https://padlet.com/ezalavra/yfyv643jg8vu/wish/342154831</link>
         <description><![CDATA[<div>Measures an upper bound on the <mark>asymptotic growth of complexity</mark>.<br>Asymptotic means as the problem input size gets really big what is the behavior? and how do I put an upper bound which will let me describe that class of behavior?<br>Big O is used to describe the worst case. <br>E.g for the computation of the factorial:<br>def fact_iter(n):<br>    answer=1<br>    while n&gt;1:<br>        answer*=n<br>        n-=1<br>    return answer<br>I calculate the number of steps to be: <mark>1+5*n+1 </mark><br>I can ignore the additive constants, the two ones. The fact that it's 5n as opposed to 7n or 3n, as n gets large really also doesn't matter. Practically, it'll be a little bit difference in time.But as an asymptotic behavior, it really doesn't matter.<br>So... I say that <mark>this a linear or order n.  O(n)<br></mark>I look at the<mark> dominant value </mark>to determine the order e.g<br>n^2+2n+1  <mark>O(n^2)</mark><br>n^2+1000n+1  <mark> O(n^2)</mark><br>log(n)+n+4    <mark>O(n)</mark><br>0.01*n*log(n)+500   <mark>O(nlog(n))</mark><br>2n^30+3^n     <mark>O(3^n)</mark><br><br></div>]]></description>
         <enclosure url="https://padlet-uploads.storage.googleapis.com/77135430/5fb2b72c76e40b4331cd9ba79ac5b8af/complexity_classes.jpg" />
         <pubDate>2019-03-17 18:48:01 UTC</pubDate>
         <guid>https://padlet.com/ezalavra/yfyv643jg8vu/wish/342154831</guid>
      </item>
      <item>
         <title>Analysing programs and their complexity</title>
         <author>ezalavra</author>
         <link>https://padlet.com/ezalavra/yfyv643jg8vu/wish/342160129</link>
         <description><![CDATA[<div>To combine complexity classes:<br>- <mark>Law of addition</mark> O(f(n))+O(g(n))=<br>O(f(n)+g(n)) e.g. 0(n)+O(n^2)=O(n^2)<br>- <mark>Law of multiplication</mark> O(f(n))*O(g(n))=<br>O(f(n)*g(n))  e.g. O(n)*O(n)=O(n*n)=O(n^2)<br><br><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2019-03-17 19:27:09 UTC</pubDate>
         <guid>https://padlet.com/ezalavra/yfyv643jg8vu/wish/342160129</guid>
      </item>
      <item>
         <title>Examples for complexity</title>
         <author>ezalavra</author>
         <link>https://padlet.com/ezalavra/yfyv643jg8vu/wish/342568981</link>
         <description><![CDATA[<div><mark>O(1) constant complexity</mark><br><mark>O(log2(n)) logarithmic complexity</mark> when it grows as the logarithm of the size of one of its inputs E.g. the search is divided in half in a bisection search <br><mark>O(n) Linear complexity </mark>e.g sequential search and all the iterations that include constant operations.<br><mark>O(nlog2(n)) Log-Linear complexity</mark> e.g merge sort<br><mark>O(n^c) Polynomial complexity</mark> - most common is Quadratic O(n^2) that grows with the square of the size of the input, usually when we have nested loops or recursive function calls.<br>O(c^n) Exponential complexity - recursive functions with more than one recursive call for each  of the problem e.g towers of hanoi<br><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2019-03-18 18:52:05 UTC</pubDate>
         <guid>https://padlet.com/ezalavra/yfyv643jg8vu/wish/342568981</guid>
      </item>
      <item>
         <title>MIT OpencourseWare</title>
         <author>ezalavra</author>
         <link>https://padlet.com/ezalavra/yfyv643jg8vu/wish/342612938</link>
         <description><![CDATA[]]></description>
         <enclosure url="https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-00sc-introduction-to-computer-science-and-programming-spring-2011/index.htm" />
         <pubDate>2019-03-18 20:51:41 UTC</pubDate>
         <guid>https://padlet.com/ezalavra/yfyv643jg8vu/wish/342612938</guid>
      </item>
      <item>
         <title>SEARcHING ALGORITHMS</title>
         <author>ezalavra</author>
         <link>https://padlet.com/ezalavra/yfyv643jg8vu/wish/342927028</link>
         <description><![CDATA[<div><strong><mark>Linear Search</mark></strong><mark> </mark>(force brute search) - <br><mark>Complexity linear O(n) ,  O(len(L))</mark><br>def Linear_Search(L, x):<br>   found=False<br>   for i to range(len(L)):<br>        if x==L[i]:<br>            found=True<br>   return found<br><br><br></div><pre><strong><em>Why bother sorting before searching?
sort the list first in order to perform a lot of searches
O(sort + K* log(len(L)) &lt; K * O(len(L))
for large K the time to sort is irrelevant </em></strong></pre><div><br><strong><mark>Bisection Search</mark></strong><mark> </mark>(list must be sorted)<br><mark>Complexity linear O(n) ,  O(len(L))</mark><br>def Bisection_Search(L, x)<br>    for i to range(len(L)):<br>        if x==L[i]:<br>            return True<br>         elif x&gt;L[i]:<br>             return False<br>   return False<br>  <br><br><mark>Bisection Search  - logarithmic complexity O(log(len(L)) because it used indexes to cut the list in half each time</mark><br>def bisect_Search2(L, x):<br>    def bisect_Search_helper(L, x, start, end):<br>        if start==end:<br>            return L[start]==x<br>        middle=(start+end)//2<br>        if L[middle]==x:<br>            return True<br>        elif L[middle]&gt;x:<br>            if start==middle:<br>                return False<br>            else:<br>                return bisect_Search_helper(L, x, start, middle-1)<br>        else:<br>            return bisect_Search_helper(L, x, middle+1, end)<br>    if L==[]:<br>        return False<br>    else:<br>        return bisect_Search_helper(L, x, 0, len(L)-1)       <br><br><mark>Bisection Search  - logarithmic complexity O(n log(len(L))<br>because it is logarithmic for each recursive call and makes a copy of the list</mark><br>def bisect_Search1(L, x):<br>    if L==[]:<br>        return False<br>    elif len(L)==1:<br>        return L[0]==x<br>    else:<br>        middle=len(L)//2<br>        if L[middle]&gt;x:<br>            return bisect_Search1(L[:middle], x)<br>        else:<br>            return bisect_Search1(L[middle:], x)<br><br><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2019-03-19 15:41:10 UTC</pubDate>
         <guid>https://padlet.com/ezalavra/yfyv643jg8vu/wish/342927028</guid>
      </item>
      <item>
         <title>SORTING ALGORITHMS</title>
         <author>ezalavra</author>
         <link>https://padlet.com/ezalavra/yfyv643jg8vu/wish/343444112</link>
         <description><![CDATA[<div><strong><mark>bogo sort,</mark></strong><mark> monkey sort, stupid sort <br></mark>randomly assign elements, check if they are sorted and repeat till they are sorted!<br><mark>Complexity is O(infinity), best case O(len(L))</mark><br>def bogo_sort(L):<br>    while not is_sorted(L):<br>        random.shuffle(L)<br>        print(L)<br>    return L <br><br><strong><mark>Bubble sort</mark></strong><mark><br>Complexity is quadratic O(n^2</mark>) because in the worst case I have len(L)-1 comparisons for the external loop and len(L)-1 repetitions for the internal loop<br>def bubble_sort(L):<br>    swap=False<br>    while not swap:<br>            swap=True<br>            for j in range(1,len(L)):<br>                if L[j-1]&gt;L[j]:<br>                    swap=False<br>                    temp=L[j]<br>                    L[j]=L[j-1]<br>                    L[j-1]=temp<br>       return L<br><br><strong><mark>Selection sort </mark></strong><br><mark>Complexity is quadratic O(n^2</mark>) because in the worst case I have len(L) repetitions  for the external loop and len(L)-suffixSt repetitions for the internal loop<br>def selection_sort(L):<br>    suffixSt=0<br>    while suffixSt!=len(L):<br>        for i in range(suffixSt, len(L)):<br>           if L[i]&lt;L[suffixSt]:<br>               L[suffixSt],L[i]=L[i], L[suffixSt]<br>        suffixSt+=1<br>     return L   <br><br><mark>Merge Sort - Divide an conquer approach <br>Complexity for merging  is linear O(n) . </mark>O(len(sublist1)+len(sublist2))=O(len(L))<br># left and right sublists are sorted<br>Complexity for sorting is logarithmic because  I devide the list in halfs and I "cut" the problem in half by the recursive calls. O(log(n)) , O(log(len(L))<br>So overall complexity is O(n log(n)) specifically O(len(L) log((len(L))<br><strong>def merge(left,right):</strong><br>    result=[]<br>    i,j=0,0<br>    while i&lt;len(left) and j&lt;len(right):<br>        if left[i]&lt;right[j]:<br>            result.append(left[i])<br>            i+=1<br>        else:<br>            result.append(right[j])<br>            j+=1<br>    while i&lt;len(left):<br>        result.append(left[i])<br>        i+=1<br>    while j&lt;len(right):    <br>        result.append(right[j])<br>        j+=1<br>        print(result)    <br><strong>def merge_sort(L):</strong><br>    if len(L)&lt;2:<br>        return L[:]<br>    else:<br>        middle=len(L)//2<br>        left=merge_sort(L[:middle])<br>        right=merge_sort(L[middle:])<br>    return merge(left,right)<br><br></div>]]></description>
         <enclosure url="https://padlet-uploads.storage.googleapis.com/77135430/da4b4159f8055d1199ab0e26ae5bcdcf/merge_sort.jpg" />
         <pubDate>2019-03-20 17:06:22 UTC</pubDate>
         <guid>https://padlet.com/ezalavra/yfyv643jg8vu/wish/343444112</guid>
      </item>
      <item>
         <title>Extra tutorials</title>
         <author>ezalavra</author>
         <link>https://padlet.com/ezalavra/yfyv643jg8vu/wish/343947555</link>
         <description><![CDATA[]]></description>
         <enclosure url="https://www.youtube.com/channel/UCUBUyRFfxs4rM7RMBTdmO_Q" />
         <pubDate>2019-03-21 18:20:54 UTC</pubDate>
         <guid>https://padlet.com/ezalavra/yfyv643jg8vu/wish/343947555</guid>
      </item>
      <item>
         <title>Revision Notes</title>
         <author>ezalavra</author>
         <link>https://padlet.com/ezalavra/yfyv643jg8vu/wish/343948111</link>
         <description><![CDATA[]]></description>
         <enclosure url="https://prod-edxapp.edx-cdn.org/assets/courseware/v1/fd7a7ff4fb393ba2d1e011f668d5f050/asset-v1:MITx+6.00.1x+1T2019+type@asset+block/mementopython3-english.pdf" />
         <pubDate>2019-03-21 18:21:52 UTC</pubDate>
         <guid>https://padlet.com/ezalavra/yfyv643jg8vu/wish/343948111</guid>
      </item>
      <item>
         <title>Using PYLAB</title>
         <author>ezalavra</author>
         <link>https://padlet.com/ezalavra/yfyv643jg8vu/wish/343983093</link>
         <description><![CDATA[<div><mark>import pylab as plt</mark><br>allows me to reference any library procedure as <mark>plt.&lt;procname&gt;</mark></div><div>e.g <strong>plt.plot(x, y) </strong>(x and y could be lists and should have the same length)<br>if I do a lot of plots they are all shown in the same figure :(<br>to have a different figure for each plot then: <strong>plt.figure('</strong>Name<strong>')<br></strong>to label the axis of the plot then: <strong>plt.xlabel('</strong>Name<strong>') , plt.ylabel('</strong>Name<strong>')</strong><br>to put a title to the plot: <strong>plt.title('</strong>Name<strong>')<br>plt.clf() </strong>to clear and redraw a plot<br><br></div><blockquote>How to visualize the differences in the graphs when they have different scales?</blockquote><div>1) set limits on the values of the axis<br>e.g. <strong>plt.ylimit(</strong>0,1000<strong>)</strong><br>2) plot multiple function in the same display = ovelaying plots<br>to add a legend that identifies each plot<br>plt.plot(x, y, l<strong>abel='</strong>Name')<br><strong>plt.legend()</strong>  or plt.legend(loc='upper left')<br>to change the color and the line of the graph I add an argument in the plot:<br><strong>plt.plot(x, y, '</strong>argument<strong>', linewidth=</strong>5<strong> )</strong> the argument can contain the color: r,g,b,k and the line type:-,o,--,^  and linewidth determines how thick the line wiil be<br>e.g: plt.plt(x, y, 'ro', linewidth=5)<br><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2019-03-21 19:36:43 UTC</pubDate>
         <guid>https://padlet.com/ezalavra/yfyv643jg8vu/wish/343983093</guid>
      </item>
   </channel>
</rss>
