-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmit6001.html
executable file
·96 lines (88 loc) · 4.57 KB
/
mit6001.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<!DOCTYPE html>
<html>
<head>
<title>MITx 6001</title>
<link rel="stylesheet" href="styles.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<span class="right-links"><a href="index.html">Home</a></span>
<img src="https://upload.wikimedia.org/wikipedia/commons/0/0c/MIT_logo.svg" height="50px">
<span><h1>MITx.6001x: Introduction to Computer Science and Programming Using Python</h1></span>
<div>
<h2>Unit 2: Simple Programs</h2>
<p>The course uses <a href="https://docs.python.org/release/3.5.10/"> Python version 3.5.10</a>, which is no longer supported. I wish MITx would update it to later versions.</p>
<p>Problem set 2 starts getting harder, but still manageable.</p>
<div>
<h3>Towers of Hanoi</h3>
<p>I find this recursive solution to the Towers of Hanoi is the most elegant solution.</p>
<h3>Learning opportunities:</h3>
<p>Even when my code passes the tests, most of the times, I can learn a lot from the solutions. However, I could not find solutions for problems in problem set 2. </p>
<div>
<table>
<tr>
<th></th>
<th>My code</th>
<th>Solution</th>
</tr>
<tr>
<td><p class="tab0">Using min()</p></td>
<td><p class="tab0"><span class="keywords">if</span> a > b:</p>
<p class="tab1"><span class="variable">testValue</span> = b</p>
<p class="tab0"><span class="keywords">else:</span></p>
<p class="tab1"><span class="variable">testValue</span> = a</p></td>
<td><p class="tab0"><span class="variable">testValue</span> = <span class="func"> min</span>(a, b)</p></td>
</tr>
<tr>
<td><p class="tab0">Using floor division</p></td>
<td><p class="tab0"><span class="variable">midIndex</span> = <span class="func">int</span>
(<span class="func"len(aStr)>len</span>(aStr)<span class="red">/</span>2)</p>
<td><p class="tab0"><span class="variable">midIndex</span> = <span class="func">len</span>(aStr)<span class="red">//</span>2</p></td>
</tr>
</table>
</div>
</div>
</div>
<div>
<h2>Unit 3: Structured Types</h2>
<p>Tupples and Lists. Problem set 3 place holder.</p>
<div>
<h3>Tuples and Lists</h3>
<p>placeholder</p>
<h3>Learning opportunities:</h3>
<p>Smart slicing</p>
<div>
<table>
<tr>
<th></th>
<th>My code</th>
<th>Solution</th>
</tr>
<tr>
<td><p class="tab0">Using slicing</p></td>
<td><p class="tab0"><span class="keywords">while</span> i < length</p>
<p class="tab1"><span class="variable">oddTuples</span> = oddTuples + (aTup[i], )</p>
<p class="tab1">i += 2</p>
<p class="tab0"><span class="variable">return</span> oddTuples</p></td>
<td><p class="tab0"><span class="variable">return</span> aTup[::2]</p></td>
</tr>
</table>
<br>
</div>
</div>
</div>
<div>
<h2>My Certificate</h2>
<div>
<p>I managed to get my Certificate, I am very happy that I got there, a bit sad that my grade wasn't shown on the
<a href="https://courses.edx.org/certificates/c72e74a9eba64b93abf8faa1adf6b0cd">MITx 6.00.1x Certificate</a>
<img src="media/mit.jpg" alt="MIT 6.001 certificate" width="100%"></p>
</div>
</div>
<br>
<footer>
<p>0ld Camel - 2024 - Version 1.0.0<br>
<a href="mailto:[email protected]">[email protected]</a></p>
</footer>
</body>
</html>