Python Challenge! 01 The First Challenge

Python

Video is ready, Click Here to View ×


Hang with our community on Discord! https://discord.gg/VCwJBcn
If you would like to support me, please like, comment & subscribe, and check me out on Patreon: https://patreon.com/johnhammond010
E-mail: johnhammond010@gmail.com
PayPal: http://paypal.me/johnhammond010
GitHub: https://github.com/JohnHammond
Site: http://www.johnhammond.org
Twitter: https://twitter.com/_johnhammond

20 thoughts on “Python Challenge! 01 The First Challenge

  1. I got sent something like this recently for a job interview, I don't know why people come up with this kind of stuff. It's esoteric and like most things you learn in school, it doesn't demonstrate 80% of what you'll come across in real-world software development. It's just one more industry designed hurdle to jump.

  2. here is a much shorter and more understandable solution. I was only able to solve this after i saw the maketrans() recommendation though.

    intab = "abcdefghijklmnopqrstuvwxyz"
    outtab = "cdefghijklmnopqrstuvwxyzab"
    transtab = str.maketrans(intab, outtab)

    str = "g fmnc wms bgblr rpylqjyrc gr zw fylb. rfyrq ufyr amknsrcpq ypc dmp. bmgle gr gl zw fylb gq glcddgagclr ylb rfyr'q ufw rfgq rcvr gq qm jmle. sqgle qrpgle.kyicrpylq() gq pcamkkclbcb. lmu ynnjw ml rfc spj."

    print(str.translate(transtab))

    I am pretty new to python and programming so any advice for improvement is appreciated 🙂

  3. What kind of python is this? Putting semi colon, {# adding hash in curly bracrs #} ? The file is saved with .py still all this syntax work? I really must be not knowing something..

  4. What I did was just increment all the chars in "map" specified in the url by 2…in other words increment their ord values by 2 and then obtain the chars….so m in map is mapped to m+2 i.e. o and similiary a to c and p to r…..so ocr…..I am not sure if this is just a coincidence…

  5. Hello, nice tutorials. Sorry to necomance this thread but had to share a more pythonic method.
    Assume text is the given jumbled text:
    #python3.4
    print(''.join([chr(ord(i)+2-26) if i in 'yz' else chr(ord(i)+2) if i not in "(). '" else i for i in text]))

    😉

  6. I'm not, actually — I tried Java years ago when I was still trying to find my niche, and I really didn't like a lot of the unecessary syntax and the massive module/library structure. I did GUI stuff with Java, but really went on to leave it alone. I'll admit, it's still one super cool language, I just don't see myself using it very often.
    How long have you been working with Python, what languages do you like alongside it?

  7. Yeah, I realized this one kind of got chopped.

    To be honest, I'm having to have to be accepting of this one. I mean, we worked through the problem, and there wasn't a whole lot left — this isn't necessarily one I want to redo. 😉

Leave a Reply

Your email address will not be published. Required fields are marked *