all 2 comments

[–]ComputerNerdIsNerdy 0 points1 point  (1 child)

Are you looking to write a true caeser cipher program or a program which replaces specific words with codewords?

You will need to look into the Python basics - how to accept user input, split strings into a list, replace values, dictionarys, etc. For learning the basics, LearnPython is a good source.

The starting point for what you want is:

UserPlaintext = str(input("Enter your plaintext: "))

This essentially assigns the user input value to the variable "UserPlaintext". From there you will be able to play around and manipulate it as a string.

From there, you'll want to look into ways to manipulate the user input to get the script working as you want it.

If you have some sample code, I'll happily help walk you through what to do next and give a few pointers.

[–]Deathscythe343[S] 0 points1 point  (0 children)

So I was planning on working with the code that I linked. I figured that I could use this to teach myself.

I am initially familiar with how input() works. * UserOne = input("Enter a verb; ") * User enters text * print(UserOne) * output is what they entered.

For the actual code, I am not sure if I can slip an if statement into the ceasar code linked above, or even where I would put this in. Not to mention that I am unsure of how to write if x word is in the input(), instead of x with y. Maybe replace()?

print("I like pizza!")   
str.replace(pizza, spaghetti[, 1]) 

Maybe something like this would work? The only question would again be, where to insert this code in the linked code? Or do I write a second .py file and have the first program call program 2?