After The Learn Python 3 Course

I have finished the Learn Python 3 course. What course should I attempt after doing the Learn Python 3 course?

def show_sentence(function, word): def do_function(function): function(word) if " " in function(word): return function @show_sentence(show_word, "Hello? ") def show_word(word): return word print(show_word)

Also, what is wrong with this code and how do I fix it?

It’s up to you! There’s no one path for everyone. What you do you want to study? What are your areas of interests?

Out of interest, raised by another member, do you remember if the course included any narrative concerning lambda or, iterators?

The course did not talk about lambda but it talked about the dunder method __init__ which creates an iterator. Also, I searched the internet and I learnt about lambda.

double_square = lambda num: (num * 2) ** 2 double_two_squared = double_square(5) print(double_two_squared) # 20 is the ouput, since (5 x 2) ^ 2 = 20.

Should the next course that I do be a beginner friendly course or an intermediate course?

What level difficulty do people learn in the Learn Python 3 course?

Good question. I will soon finish python 3, I would like to be able to make apps from it, what is the next step?

I’ve found the Pass the Technical Interview with Python course, the Linear Data Structures course and the Learn Recursion with Python course. Which one should I do first? Further I could do the Learn Complex Data Structures course. Do think it is a good course to do after I finish the Linear Data Structures and / or Learn Recursion with Python course?

When you say apps do you mean web applications or applications for your PC (or something else entirely, the meaning is a bit diffuse these days :grinning:)? If you like codecademy’s learning style then I think a good option is to look at the catalogue and view by subject (second dropdown on the left) which is organised by the purpose of the course instead-

Then you can choose to learn something that interests you (web development, data science etc. etc.). Might be worth viewing the sorting quiz too which tries to find a topic which suits you (but it’s your choice at the end of the day). What do you want to do?

They’re all good and interesting courses (I think by and large they’re wrapped up in the computer science path, check the syllabus to be sure). If you’re just looking for extended usage of Python then by all means go through them, a number of books like fluent python or the python cookbook (by no means an exhaustive list) spend more time digging into options in the language itself.

It might be worthwhile setting an end goal here though. That way you can start working on something practical and direct your attention towards larger projects. Even if you’re still digging around in the language itself I think practical application of the language would be a useful accompaniment.

Your problem is this:

Traceback (most recent call last):
  File "", line 7, in <module>
    @show_sentence(show_word, "Hello? ")
NameError: name 'show_word' is not defined

On line 7 you’re attempting to do @show_sentence(show_word, "Hello? ") but at that point in the program you’ve not defined show_word.

You don’t need to do that to wrap the function with the decorator.

Here’s a simple example:

def reverse_word(func):
    def wrapper_reverse_word(word):
        if type(word) == str:
            word = word[len(word)::-1]
    return wrapper_reverse_word

def print_word(word):

def print_another_word(word):

The output:

>>> print_word("abracadabra")
>>> print_another_word("abracadabra")
>>> print_another_word([2,4,6,8,"motorway"])
[2, 4, 6, 8, 'motorway']
def reverse_word(func): def wrapper_reverse_word(word): if type(word) == str: word = word[len(word)::-1] func(word) return wrapper_reverse_word def print_word(word): print(word) @reverse_word def print_another_word(word): print(word) print_word("abracadabra") print_another_word("abracadabra") print_another_word([2,4,6,8,"motorway"])

Thank you tgrtim.
I wanna build apps such as those used on smart phones. I have loads of ideas!! I startedd with python ■■■ according to my research it is the easiest and most popular. Now when I search for app making, python does not seem to be popular anymore. Do you think the javascript is best for smartphone app making?

There are javascript frameworks you can use to develop for phones. It’s not something I’ve used so I can’t comment on the popularity or ease of use.

Maybe you could compare it to some of the tools available here-

If that’s not enough information have a web search for the options and their pros and cons or consider an additional query. It’s not something I know enough about to really offer any advice.

1 Like

What does this line do:
word = word[len(word)::-1]
What exactly is :: when slicing strings?

It’s a placeholder for [start:stop:step]. You can leave it empty to represent the default values. Play around with it in the terminal to get a feel for it.

Exempli gratia:

>>> my_wonderful_list = ['a','b','c','d']
>>> my_wonderful_list[::]
['a', 'b', 'c', 'd']
>>> my_wonderful_list[::2]
['a', 'c']
>>> my_wonderful_list[1::2]
['b', 'd']
>>> my_wonderful_list[::-1]
['d', 'c', 'b', 'a']
>>> my_wonderful_list[:2:]
['a', 'b']
1 Like