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,075
    Reputation
    28
    Thanks
    140
    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
    50
    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,075
    Reputation
    28
    Thanks
    140
    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,811
    Reputation
    515
    Thanks
    582
    My Mood
    Sneaky
    Try this place.

    And can't Google help?
    I'm not Ben Affleck.

  5. #5
    thisisreal34's Avatar
    Join Date
    May 2014
    Gender
    male
    Location
    united kingdom
    Posts
    1,075
    Reputation
    28
    Thanks
    140
    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,864
    Reputation
    289
    Thanks
    2,162
    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,075
    Reputation
    28
    Thanks
    140
    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,864
    Reputation
    289
    Thanks
    2,162
    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,328
    Reputation
    1175
    Thanks
    477
    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 12:08 PM.



  11. #10
    thisisreal34's Avatar
    Join Date
    May 2014
    Gender
    male
    Location
    united kingdom
    Posts
    1,075
    Reputation
    28
    Thanks
    140
    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,328
    Reputation
    1175
    Thanks
    477
    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
    16,832
    Reputation
    3038
    Thanks
    5,935
    this is ur second thread isnt it...




    Contact me via
    | |
     
    Nig Boi since - 12.15.96
    MPGH Member Since - 12.28.08
    MPGH Cocksucker Since - 05.17.12
    MPGH Wiki Manager Since - 11.16.12
    ROTMG Minion Since -10.22.13
    PB Minion Since - 12.12.13

    R.I.P Royce Since - 1.13.14
    The Return (ROTMG) since 03.23.15
    GTA Minion since 04.22.15

    R.I.P Royce again since 06.28.15
    The Return again(Steam) since 02.28.17
    CrossFire Minion Since -09.20.17
    Fornite Minion Since - 10.10.17

     
    "well ain't dat sum shit. Sucks for you, but you did well professionally, and nobody can ever say you would be shit at any future positions. But you just gotta know when to not fuck up, or just go the silent mod route like tommi, or ravallo, or nico." - Doc


    Quote Originally Posted by Illuminarly View Post
    Did you refresh the thread and see my comment? No way you replied that quickly


  14. #13
    thisisreal34's Avatar
    Join Date
    May 2014
    Gender
    male
    Location
    united kingdom
    Posts
    1,075
    Reputation
    28
    Thanks
    140
    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,328
    Reputation
    1175
    Thanks
    477
    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
    Location
    @root
    Posts
    11,937
    Reputation
    3334
    Thanks
    5,471
    My Mood
    Inspired
    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 05:36 PM.





    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, 06:40 AM
  2. Python: Need help with GeoIP tracing
    By xTennox in forum Programming Tutorials
    Replies: 1
    Last Post: 10-30-2014, 11: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, 02:14 PM
  4. Game Bypass (.atpy and Python) help? xD
    By Felixmaster45 in forum Game Development
    Replies: 0
    Last Post: 11-08-2012, 11:39 PM
  5. Replies: 1
    Last Post: 05-23-2012, 08:32 PM