Jump to content

My first program


Recommended Posts

This is my first program, just wanted to see what you guys think.

Its in python, which i will recomend as a great language to learn in.

import string
letters = string.ascii_lowercase + string.ascii_uppercase + string.punctuation
word = (raw_input("what word would you like to encode ?"))
encoded = ''
for letter in word:
    if letter == ' ':
        encoded = encoded + ' '
    else:
        x = letters.index(letter) + 5
        encoded = encoded + letters[x]
print encoded

if you can't tell what it does, it cyphers text.

Ex. the above would be

Dtz hfs,y yjqq Bmfy ny itjx; ny hDumjwx yjCy=

all you have to do to decypher it is change the + 5 to -5 lol

it's simple, but i think its cool.

Link to comment
Share on other sites

  • 1 month later...
  • 2 weeks later...
Wow that is from back in the day.

I wrote that by myself, but now I'm onto loading 3d models, and making animation using opengl!

It's funny how things work out, I don't even use python anymore, I've moved onto c++.

 

 

Joe

 

Wow, you mean this code was old? So, do you have a professional graphics rendering program or what? Like Xara or Photoshop Elements CS3 or do you just use GIMP for the 3D models?

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...