Click here to Skip to main content
15,949,741 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
Develop another security system that works with a key "five jugs" 
Let the given string be "Python" and the key is "five jugs"
Abcdefghijklmnopqrstuvwxyz 
Fivejugsabcdhklmnopqrtwxyz
So as per the mapping above,  "python" becomes "mypalk"

What I have tried:

i dont know how to start so i couldnt really get any code.please help me out here.
Posted
Updated 9-Nov-20 4:20am
Comments
Richard Deeming 9-Nov-20 8:32am    
If you really don't know where to start your homework, then talk to your teacher. That's what they're there for!

you need to learn the language Python to start. Find some Python tutorial and install the runtime.

This crypto algorithm is very simple called caesars cipher where every characters is translated into its "secret". This is easiest done over an array in which the plain table gives the index and the secret table give the character for the index.

example:

an 'c' is the 2 character in the plain table
you get the 'v' as third characters of the secret table
 
Share this answer
 
This is the same problem as you asked this morning: How do I write a code for this in Python?[^] and the solution is the same, except instead of a "fixed character offset" you need to maintain two indexes and change the offset according to one of them by the "key string".

You aren't going to get anywhere unless you start thinking about these simple problems for yourself - they are only going to get harder as you move through the course!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900