Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Strazil4448yHave 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 :)
-
ddephor44468yCould easily be made a tail call to avoid stack overflow, but unfortunately python doesn't support tail calls 😕
-
Strazil4448y@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
-
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.
-
@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
-
Russian4038yYou 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
Related Rants
The journey is starting 😡
undefined
python
web development
junior
theroadtoprogrammer