Cover photo

Week 1-2: Learning Python

It’s been two weeks of learning Python

And it has had it’s ups and downs. This blog is a way of holding myself accountable, because I plan on learning for the next year (at least) with the goal of writing bots and apps with Python and GPT-3.

My strategy is simple:

  • Try to study everyday (don’t miss weekends if possible)

  • Start with free courses

  • Put what I’m learning to work

  • Build a dope army of Twitter bots that use GPT-3 / OpenAI to easily interact with projects in Web3

First Big Lesson: Python is heavy on math

I’m not a math savant. Not even close. Today’s lesson made that apparently clear, especially this practice module:

seriously, what the godamn fuck is this shit?”

def median(lst):
    sorted_list = sorted(lst)
    if len(sorted_list) % 2 != 0:
        #odd number of elements
        index = len(sorted_list)//2 
        return sorted_list[index]
    elif len(sorted_list) % 2 == 0:
        #even no. of elements
        index_1 = len(sorted_list)/2 - 1
        index_2 = len(sorted_list)/2
        mean = (sorted_list[index_1] + sorted_list[index_2])/2.0
        return mean
   
print median([2, 4, 5, 9])

Progress, baby!

My strategy is to continue through, even when I don’t fully understand. I’m hoping some of the math starts to make sense as I do it more. However I have a feeling I’m going to need to spend some time digging deeper into these equations.

Currently I’m using the free version of Codecademy and am working my way through the Python 2 course. I’m 71% of the way through in two weeks.

post image

Some of the biggest hurdles learning Python so far

I took a few notes on confusing things I came across today.

  • Some for and while loops confuse me

  • The difference between .() and word() is a bit confusing, too.

  • Not quite sure what range() is yet

  • What exactly does return do?

  • Not sure on math

TBH, these are a bit de-motivating. Trying to understand them makes me feel stupid. But I shall forge forward, because time is ultimate equalizer and I think I can learn it by brute force.