Help creating a cryptogram
Hello, all... I am new to python, learning the basics..and to be honest I'm not very good at it. I have an assignment where I have to create a cryptogram..I just don't know where to start. If someone can get me pointed in the right direction I can usually gain momentum and figure out the assignment. That being said, if anyone could show me an outline or a sample of a past one you've created to help me write one of my own I would appreciate it. also we use python 3. Thank you!
You could cheat and use a ROT13 converter, which just shifts all the letters halfway around the alphabet. Around here, we can read that like it was uncoded, so you probably couldn't fool your teacher. I'm unfamiliar with Python. This sounds more like a computer assignment than one for encryption.
wjhowell89: Making a cryptogram is simple. You first create the code by writing the alphabet and then assigning a unique code letter to each alphabet letter. You could ensure the code letters are unique by writing a second alphabet and crossing off each letter as you assign it. Then, once you have the code alphabet set up, just choose a short passage of writing and rewrite it using the code letters from your code alphabet. (Did I explain that clearly??)
Note: What I described is how you create a cryptogram by hand. If you are asking how to create a cryptogram using a computer program, I have no clue. We solve the puzzles at this site using only our brains, eyes, and fingers. The person who built the site may be able to help you, since he does in fact use software to generate cryptograms for us to solve. You can reach him via the "Questions or Comments" box at the foot of this page.
There is a web site that will do it automatically for you. Look for 'create cryptogram'.
This is a simple cryptoquip: a phrase that needs to be solved.
from random import shuffle, random, choice
from scramble import *
from puns001 import *
'u','v','w','x','y','z'] #keys that match the phase
17,18,19,20,21,22,23,24,25] # number of keys minus one
L= letters[:] # copy to be the values
shuffle(L) # randomly mix values
ran_let= scramble3(L)[choice(nums)] # scramble values and pick one
quip_d= dict(zip(letters, ran_let)) # make a dicionary of keys and values
pick_p= choice(phrase) # randomly pick a phrase
res=  #empty list to hold the mixed phrase
for x in pick_p.lower(): #take each individual letter in phrase
z= quip_d.get(x, ' ') #get the value from key
res.append(z) #add to the new list
print("your hint is: ", hint_letter, '=', quip_d[hint_letter])
print('Solve: ',res ) # show the puzzle
prompt= 'Answer: '
goal= 0 # to switch off with correct answer.
while goal < 1: #main part you need to type the exact phrase.
if pick_p == guess:
print('Winner winner chicken dinner')
print('Wrong keep trying')
It appears to be a crypto generating program, though I'm not familiar with the language.
Not sure how well it works. One key is to make sure the encrypted letter is not the same as the plain text letter. I don't spot a test to make sure that is the case.
The other key is to make sure that a given encrypted letter is used for only one plain text letter. I don't understand the setup well enough to be sure that is the case.
|All times are GMT. The time now is 06:28 AM.|
Powered by vBulletin® Version 3.6.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.