A little program I made to do some simple encoding.... but it keeps saying I have syntax error where the 'p' is in my 'rep' variable... and I know good and well there is no syntax error!
Code:
from __future__ import division
import string
import random
while 1 > 0:
def process(op1, op2):
ran = str(random.randrange(0, 1000, 1)
rep = string.replace(op1, op2, ran)
xx = rep
aa = [xx+xx**2, xx+xx**3, xx+xx**4, xx-xx**2, xx-xx**3, xx-xx**4, xx**2+xx**3, xx**2+xx**4, xx**2-xx**3, xx**2-xx**4, xx**3+xx**4, xx**3-xx**4]
start_1 = random.choice(aa)
ex = str(start_1/4)
rr = string.replace(op1, op2, ex)
return rr
p = raw_input('>>> ')
pp = string.join(p)
n_0 = process(pp, '0')
n_1 = process(n_0, '1')
n_2 = process(n_1, '2')
n_3 = process(n_2, '3')
n_4 = process(n_3, '4')
n_5 = process(n_4, '5')
n_6 = process(n_5, '6')
n_7 = process(n_6, '7')
n_8 = process(n_7, '8')
n_9 = process(n_8, '9')
a = process(n_9, 'a')
A = process(a, 'A')
b = process(A, 'b')
B = process(b, 'B')
c = process(B, 'c')
C = process(c, 'C')
d = process(C, 'd')
D = process(d, 'D')
e = process(D, 'e')
E = process(e, 'E')
f = process(E, 'f')
F = process(f, 'F')
g = process(F, 'g')
G = process(g, 'G')
h = process(G, 'h')
H = process(h, 'H')
i = process(H, 'i')
I = process(i, 'I')
j = process(I, 'j')
J = process(j, 'J')
k = process(J, 'k')
K = process(k, 'K')
l = process(K, 'l')
L = process(l, 'L')
m = process(L, 'm')
M = process(m, 'M')
n = process(M, 'n')
N = process(a, 'N')
o = process(N, 'o')
O = process(n, 'O')
p = process(O, 'p')
P = process(p, 'P')
q = process(P, 'q')
Q = process(q, 'Q')
r = process(Q, 'r')
R = process(r, 'R')
s = process(R, 's')
S = process(s, 'S')
t = process(S, 't')
T = process(t, 'T')
u = process(T, 'u')
U = process(u, 'U')
v = process(U, 'v')
V = process(v, 'V')
w = process(V, 'w')
W = process(w, 'W')
x = process(W, 'x')
X = process(x, 'X')
y = process(X, 'y')
Y = process(y, 'Y')
z = process(Y, 'z')
Z = process(z, 'Z')
r_ = string.replace(Z, ' ', '$')
r_0 = string.replace(r_, '-', '>')
r_01 = string.replace(r_0, '.', '#')
r_1 = string.replace(r_01, '1', '-Z')
r_2 = string.replace(r_1, '2', '-Y')
r_3 = string.replace(r_2, '3', '-X')
r_4 = string.replace(r_3, '4', '+A')
r_5 = string.replace(r_4, '5', '+B')
r_6 = string.replace(r_5, '6', '+C')
r_7 = string.replace(r_6, '7', '^z')
r_8 = string.replace(r_7, '8', '^y')
r_9 = string.replace(r_7, '9', '^x')
r_0 = string.replace(r_7, '0', '_')
print(r_0)
Do what thou wilt shall be the whole of the Law. Love is the law, love under will.
.::The Rights of Man::.
.::The Rights of Man::.