Thread: python help

Page 1 of 2 12 LastLast
Results 1 to 15 of 17
  1. #1
    thisisreal34's Avatar
    Join Date
    May 2014
    Gender
    male
    Location
    united kingdom
    Posts
    1,073
    Reputation
    28
    Thanks
    158
    My Mood
    Amazed

    python help

    im coding a simple program to encrypt and decrypt but im having problems one i cant get the code to restart with a user input to on one line it repeats the same thing if anyone could fix this it would help
    https://gyazo.com/4d5b49ae6ecb9f2613c4ee8ecc29fdbf there is the double error
    https://gyazo.com/3ebd5e6ca604892dd8b3c0e31fbcd1b9 code so i know how to restart

  2. #2
    AIMWARE's Avatar
    Join Date
    Aug 2014
    Gender
    female
    Posts
    48
    Reputation
    10
    Thanks
    46
    y dont u use the built in encryption libraries and methods
    Code:
    def encode(key, string):
        encoded_chars = []
        for i in xrange(string):
            key_c = key[i % len(key)]
            encoded_c = chr(ord(string[i]) + ord(encoded_c) % 256)
            encoded_chars.append(encoded_c)
        encoded_string = "".join(encoded_chars)
        return base64.urlsafe_b64encode(encoded_string)
    source from stackoverflow
    Quote Originally Posted by asimkaaaa View Post
    approve fast or i kill allah
    rip 25/1/15 w o r l d s t a r c h a m p s : a i m w a r e h o r i z o n s c o t i a

  3. #3
    thisisreal34's Avatar
    Join Date
    May 2014
    Gender
    male
    Location
    united kingdom
    Posts
    1,073
    Reputation
    28
    Thanks
    158
    My Mood
    Amazed
    Quote Originally Posted by ******* View Post
    y dont u use the built in encryption libraries and methods
    Code:
    def encode(key, string):
        encoded_chars = []
        for i in xrange(string):
            key_c = key[i % len(key)]
            encoded_c = chr(ord(string[i]) + ord(encoded_c) % 256)
            encoded_chars.append(encoded_c)
        encoded_string = "".join(encoded_chars)
        return base64.urlsafe_b64encode(encoded_string)
    source from stackoverflow
    because technically this is for my gcse so if i used that i would be disqualified for cheating

  4. #4
    Before the gods, there were the Titans.
    Premium Member
    Batman's Avatar
    Join Date
    Jan 2014
    Gender
    male
    Location
    Wherever the road wishes to take me.
    Posts
    3,841
    Reputation
    544
    Thanks
    595
    My Mood
    Sneaky
    Try this place.

    And can't Google help?

  5. #5
    thisisreal34's Avatar
    Join Date
    May 2014
    Gender
    male
    Location
    united kingdom
    Posts
    1,073
    Reputation
    28
    Thanks
    158
    My Mood
    Amazed
    Quote Originally Posted by Titanate View Post
    Try this place.

    And can't Google help?
    i see no python section and no i have searched all over

  6. #6
    Jew's Avatar
    Join Date
    Apr 2013
    Gender
    male
    Location
    <dd style="overflow: hidden;">here</dd>
    Posts
    3,860
    Reputation
    289
    Thanks
    2,178
    My Mood
    Amazed
    python is the worst thing to happen to coding

    use java
    Vouch thread





     

    Quote Originally Posted by foginho81 View Post
    Hello guys,5 mins ago i dowloaded this program, in 2 minutes i cracked an account, so i purchased Premium for supporting and have unlimited features!

    A+++ Tool GREAT CODER!
    Quote Originally Posted by shadowkiller198 View Post
    I just purchased a Premium account and I haven't had any problems with it!

    Quote Originally Posted by ImShan View Post
    Vouch for this guy!

    I just bought premium and works pretty good.
    Quote Originally Posted by SiiKFO View Post
    Vouch bought premium works very well
    Quote Originally Posted by DarkBlade324 View Post
    vouch i just bought premium it works great
    Quote Originally Posted by coolzombiesg View Post
    Vouch for him

    I just bought premium and works pretty good.
    Quote Originally Posted by KaizoPvP View Post
    VOUCHE: Yep, you are a legit seller, and I like the stuff you do.
    Quote Originally Posted by BTNGaming View Post
    Premium Purchased

  7. The Following User Says Thank You to Jew For This Useful Post:

    Deflorate. (01-31-2015)

  8. #7
    thisisreal34's Avatar
    Join Date
    May 2014
    Gender
    male
    Location
    united kingdom
    Posts
    1,073
    Reputation
    28
    Thanks
    158
    My Mood
    Amazed
    Quote Originally Posted by Ex0rPl4net View Post
    python is the worst thing to happen to coding

    use java
    i would if i could but im required to use python its part off the specifacation or i would use visual basic for the gui its easier -.-

  9. #8
    Jew's Avatar
    Join Date
    Apr 2013
    Gender
    male
    Location
    <dd style="overflow: hidden;">here</dd>
    Posts
    3,860
    Reputation
    289
    Thanks
    2,178
    My Mood
    Amazed
    Quote Originally Posted by thisisreal34 View Post
    i would if i could but im required to use python its part off the specifacation or i would use visual basic for the gui its easier -.-
    look.

    i dont code python but from what i can you are not debugging your code.

    make sure to print out things for every line of code to assist you at finding the problem
    Vouch thread





     

    Quote Originally Posted by foginho81 View Post
    Hello guys,5 mins ago i dowloaded this program, in 2 minutes i cracked an account, so i purchased Premium for supporting and have unlimited features!

    A+++ Tool GREAT CODER!
    Quote Originally Posted by shadowkiller198 View Post
    I just purchased a Premium account and I haven't had any problems with it!

    Quote Originally Posted by ImShan View Post
    Vouch for this guy!

    I just bought premium and works pretty good.
    Quote Originally Posted by SiiKFO View Post
    Vouch bought premium works very well
    Quote Originally Posted by DarkBlade324 View Post
    vouch i just bought premium it works great
    Quote Originally Posted by coolzombiesg View Post
    Vouch for him

    I just bought premium and works pretty good.
    Quote Originally Posted by KaizoPvP View Post
    VOUCHE: Yep, you are a legit seller, and I like the stuff you do.
    Quote Originally Posted by BTNGaming View Post
    Premium Purchased

  10. #9
    Youtro's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Location Location Location!
    Posts
    3,344
    Reputation
    1175
    Thanks
    491
    My Mood
    Yeehaw
    freaken python :|
    edit: dude.. you're just printing translated again in the while loop..
    Last edited by Youtro; 01-31-2015 at 11:08 AM.



  11. #10
    thisisreal34's Avatar
    Join Date
    May 2014
    Gender
    male
    Location
    united kingdom
    Posts
    1,073
    Reputation
    28
    Thanks
    158
    My Mood
    Amazed
    Quote Originally Posted by Youtro View Post
    freaken python :|
    edit: dude.. you're just printing translated again in the while loop..
    if i dont put it there when you type yes it wont recall the message

  12. #11
    Youtro's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Location Location Location!
    Posts
    3,344
    Reputation
    1175
    Thanks
    491
    My Mood
    Yeehaw
    Quote Originally Posted by thisisreal34 View Post
    if i dont put it there when you type yes it wont recall the message
    print ("do you want to recall?")
    recall = input()
    then you start the while loop.



  13. #12
    Royce's Avatar
    Join Date
    Oct 2011
    Gender
    male
    Posts
    17,967
    Reputation
    4088
    Thanks
    6,418
    this is ur second thread isnt it...

  14. #13
    thisisreal34's Avatar
    Join Date
    May 2014
    Gender
    male
    Location
    united kingdom
    Posts
    1,073
    Reputation
    28
    Thanks
    158
    My Mood
    Amazed
    Quote Originally Posted by Youtro View Post

    print ("do you want to recall?")
    recall = input()
    then you start the while loop.
    now it just spams the translated on and on solution for that ?

    - - - Updated - - -

    Quote Originally Posted by Youtro View Post

    print ("do you want to recall?")
    recall = input()
    then you start the while loop.
    added a break thanks alot

  15. #14
    Youtro's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Location Location Location!
    Posts
    3,344
    Reputation
    1175
    Thanks
    491
    My Mood
    Yeehaw
    Quote Originally Posted by thisisreal34 View Post
    now it just spams the translated on and on solution for that ?
    sigh.. just remove the first "print(translated)" just above the comment in the middle.. this code is so shit lol

    (in your original code i.e)



  16. #15
    Psychotic's Avatar
    Join Date
    May 2012
    Gender
    male
    Posts
    13,825
    Reputation
    4234
    Thanks
    6,055
    Quote Originally Posted by Ex0rPl4net View Post
    python is the worst thing to happen to coding

    use java
    Are you an autism enthusiast?
    Python is one of the most powerful upcoming languages in the recent decades. It's replaced Fortran with the amount of scientific and mathematical libraries users have developed, is beginning to become Perl's number one competitor, it's a scripting language thus it's much simpler as well as the syntax makes it flexible and easy to learn, and furthermore although it's considered a scripting language is used for third tier architectural programs all the time. The immediacy of it being "scripty" along with it's easy to learn syntax/simplicity makes it a language you can always rely on.

    Nonetheless, Java is a great language, but I think the statement of it being the worst thing to happen to coding is absurd and I'm honestly offended that someone would be so oblivious.

    (looking at code, will edit)

    edit:
    Uh, if the issue you're encountering is that it prints out twice that's because you've assigned the variable recall to 'yes' and then right after you have a while statement for while it's yes, print translated. Thus, it will print the translated message twice because right above you have: print translated.

    https://i.imgur.com/jfMRBvP.png
    Last edited by Psychotic; 01-31-2015 at 04:36 PM.






    Super User since 02.02.2020
    Global Moderator since 09.23.2017
    Moderator since 09.01.2016
    Minion+ since 07.22.2016

    Marketplace Minion since 06.09.2016
    Trove Minion since 06.06.2016
    Middleman since 04.21.2016
    Social Engineering Minion since 02.03.2016
    News FO Freelancer From 11.08.2015 to 07.23.2016
    News FO Head Editor From 08.23.2015 to 11.08.2015
    News FO Head Editor From 07.19.2012 to 08.11.2014
    MPGH News and News FO Founder
    Programming Minion From Unknown to 04.23.2013
    Minecraft Minion From 09.19.2012 to 04.23.2013
    Member since 05.13.2012



Page 1 of 2 12 LastLast

Similar Threads

  1. python help
    By thisisreal34 in forum General
    Replies: 7
    Last Post: 01-24-2015, 05:40 AM
  2. Python: Need help with GeoIP tracing
    By xTennox in forum Programming Tutorials
    Replies: 1
    Last Post: 10-30-2014, 10:45 PM
  3. [Help Request] Any Expericanced C++ or Python Programmers Please Help.
    By 1loggerboy2 in forum C++/C Programming
    Replies: 4
    Last Post: 01-03-2013, 01:14 PM
  4. Game Bypass (.atpy and Python) help? xD
    By Felixmaster45 in forum Game Development
    Replies: 0
    Last Post: 11-08-2012, 10:39 PM
  5. Replies: 1
    Last Post: 05-23-2012, 07:32 PM