Need Python Help

756 views
Skip to first unread message

Edward Teach

unread,
Oct 22, 2025, 8:09:38 AM10/22/25
to Python GCU Forum
Hello,

I would like to be able to create a Python script that would encode a password with the ROT13 algorithm.  For instance, if my password is "fishing", I would like to encode the password to svfuvat.  Thanks in advance.

------------------------------
Edward Teach

Prateek Singh

unread,
Oct 22, 2025, 8:12:55 AM10/22/25
to python-g...@googlegroups.com
😊

--
You received this message because you are subscribed to the Google Groups "Python GCU Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python-gcu-for...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/python-gcu-forum/79874707-42c6-4a06-ab99-d6c384f2e4fbn%40googlegroups.com.

Tejveer Tummala

unread,
Oct 22, 2025, 8:16:34 AM10/22/25
to python-g...@googlegroups.com

def rot13(text):

    result = []

    for char in text:

        if 'a' <= char <= 'z':  # lowercase letters

            result.append(chr((ord(char) - ord('a') + 13) % 26 + ord('a')))

        elif 'A' <= char <= 'Z':  # uppercase letters

            result.append(chr((ord(char) - ord('A') + 13) % 26 + ord('A')))

        else:

            result.append(char)  # leave non-alphabet characters unchanged

    return ''.join(result)



if __name__ == "__main__":

    password = input("Enter your password: ")

    encoded = rot13(password)

    print(f"Encoded (ROT13): {encoded}")



Ajit Pawar

unread,
Oct 22, 2025, 8:22:57 AM10/22/25
to python-g...@googlegroups.com
def rot_encode(password):
result = ""
for char in password:
# For lowercase letters

if 'a' <= char <= 'z':
result += chr((ord(char) - ord('a') + 13) % 26 + ord('a'))
# For uppercase letters

elif 'A' <= char <= 'Z':
result += chr((ord(char) - ord('A') + 13) % 26 + ord('A'))
# For non-alphabetic characters (numbers, symbols, etc.)
else:
result += char
return result

# Example usage
password = "fishing"
encoded = rot13_encode(password)
print(f"Original: {password}")
print(f"Encoded : {encoded}")


압둘하미드이드리스

unread,
Feb 14, 2026, 6:53:23 PM (5 days ago) Feb 14
to Python GCU Forum
What algorithm do you want to use? 

பிரபா கரன்

unread,
Feb 14, 2026, 6:59:27 PM (5 days ago) Feb 14
to python-g...@googlegroups.com
Hello,

Thank you for the response.
Yes, I’m planning to implement the password encoding using the ROT13 algorithm in Python.

Best regards.

--
You received this message because you are subscribed to the Google Groups "Python GCU Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python-gcu-for...@googlegroups.com.

Ngush Savio 19

unread,
Feb 14, 2026, 11:06:20 PM (5 days ago) Feb 14
to python-g...@googlegroups.com
kindly which version do you need me to solve it with?
  • Use the basic version for simple scripts

  • Use the interactive version for manual encoding

  • Use the GUI version for a user-friendly interface

  • Use the command-line version for automation 


Reply all
Reply to author
Forward
0 new messages