Home

MITx.6001x: Introduction to Computer Science and Programming Using Python

Unit 2: Simple Programs

The course uses Python version 3.5.10, which is no longer supported. I wish MITx would update it to later versions.

Problem set 2 starts getting harder, but still manageable.

Towers of Hanoi

I find this recursive solution to the Towers of Hanoi is the most elegant solution.

Learning opportunities:

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.

My code Solution

Using min()

if a > b:

testValue = b

else:

testValue = a

testValue = min(a, b)

Using floor division

midIndex = int (len(aStr)/2)

midIndex = len(aStr)//2

Unit 3: Structured Types

Tupples and Lists. Problem set 3 place holder.

Tuples and Lists

placeholder

Learning opportunities:

Smart slicing

My code Solution

Using slicing

while i < length

oddTuples = oddTuples + (aTup[i], )

i += 2

return oddTuples

return aTup[::2]


My Certificate

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 MITx 6.00.1x Certificate MIT 6.001 certificate