27
Comments
  • 4
    Codecademy! Great place to learn!
  • 0
    @Nerd93 @53414a414e Thanks I hope I can do finish the course and understand it
  • 9
    Be mindful of your stack level with those recursive calls ~
  • 4
    Have fun diving into Python! 😆 Maybe something fun for your "Story like program" is to make the letters print slowly or with a small delay as someone was typing them. You can do this with modules, time and sys :)
  • 2
    @matsaki95 Isnt the default 1000?
  • 1
    Could easily be made a tail call to avoid stack overflow, but unfortunately python doesn't support tail calls 😕
  • 1
    @ddephor Well, just use iteration instead of recursion wherever you can. You can also set the limit above 1000 ( although this is not recommended) and there are also some workarounds in Python if you want to achieve something like tail call.. But in the end, you normally shouldnt reach the max limit of 1000 anyway
  • 1
    @matsaki95 I agree, but we all started like this 😁 atleast i did..
  • 2
    I liked "Learn Python the Hard Way" because codecademy felt like it was holding my hand, LPTHW got me up to speed fast in Python and IDEs.
  • 0
    @Wallpaper codecademey is great for a quick syntax dose, it doesn't teach you really how to use the language. For that you need something a little more like LTHW or a more structured course to get that "proficiency" level required to have a job
  • 1
    You could do a while loop in this case

    For example:

    while True:
    answer = raw_input('Choice: ')
    if answer in ('l', 'left'):
    # Do stuff
    break
    elif answer in ('r', 'right'):
    # do other stuff
    break
    else:
    print('try again')

    :) happy learning
Add Comment