Attempting to make banners in python.

Hewlett-packard Pavilion dv6-2190us note...
March 9, 2013 at 21:56:08
Specs: Win 7, Core i5 / 4 gigs
from __future__ import print_function

# this is a banner program
# my attempt at this program will be to create predefined letters
# and objects

# # #
### ### # # ###
# # ## # # # #
# # ### ## ## ###

# this is the attempt at what this is to look like
# use this as an example: tel = {'jack': 4098, 'sape': 4139}
# tel['guido'] = 4127

A={}
A[0]=""" # """
A[1]=""" # # """
A[2]=""" ### """
A[3]=""" # # """
A[4]=""" # # """

B={}
B[0]=""" ## """
B[1]=""" # # """
B[2]=""" ## """
B[3]=""" # # """
B[4]=""" ## """

C={}
C[0]=""" ## """
C[1]=""" # """
C[2]=""" # """
C[3]=""" # """
C[4]=""" ## """

D={}

D[0]=""" ## """
D[1]=""" # # """
D[2]=""" # # """
D[3]=""" # # """
D[4]=""" ## """

E={}

E[0]=""" ### """
E[1]=""" # """
E[2]=""" ## """
E[3]=""" # """
E[4]=""" ### """

F={}

F[0]=""" ### """
F[1]=""" # """
F[2]=""" ## """
F[3]=""" # """
F[4]=""" # """

G={}

G[0]=""" ## """
G[1]=""" # """
G[2]=""" # # """
G[3]=""" # # """
G[4]=""" ## """

H={}

H[0]=""" # # """
H[1]=""" # # """
H[2]=""" ### """
H[3]=""" # # """
H[4]=""" # # """

I={}

I[0]=""" ### """
I[1]=""" # """
I[2]=""" # """
I[3]=""" # """
I[4]=""" ### """

J={}

J[0]=""" ## """
J[1]=""" # """
J[2]=""" # """
J[3]=""" # # """
J[4]=""" # """

K={}

K[0]=""" # # """
K[1]=""" # # """
K[2]=""" ## """
K[3]=""" # # """
K[4]=""" # # """

L={}

L[0]=""" # """
L[1]=""" # """
L[2]=""" # """
L[3]=""" # """
L[4]=""" ### """

M={}

M[0]=""" # # """
M[1]=""" ### """
M[2]=""" ### """
M[3]=""" # # """
M[4]=""" # # """

N={}

N[0]=""" ### """
N[1]=""" # # """
N[2]=""" # # """
N[3]=""" # # """
N[4]=""" # # """

O={}

O[0]=""" # """
O[1]=""" # # """
O[2]=""" # # """
O[3]=""" # # """
O[4]=""" # """

P={}

P[0]=""" ## """
P[1]=""" # # """
P[2]=""" ## """
P[3]=""" # """
P[4]=""" # """

Q={}

Q[0]=""" # """
Q[1]=""" # # """
Q[2]=""" # # """
Q[3]=""" ## """
Q[4]=""" # """

R={}

R[0]=""" ## """
R[1]=""" # # """
R[2]=""" ## """
R[3]=""" # # """
R[4]=""" # # """

S={}

S[0]=""" ## """
S[1]=""" # """
S[2]=""" # """
S[3]=""" # """
S[4]=""" ## """

T={}

T[0]=""" ### """
T[1]=""" # """
T[2]=""" # """
T[3]=""" # """
T[4]=""" # """

U={}

U[0]=""" # # """
U[1]=""" # # """
U[2]=""" # # """
U[3]=""" # # """
U[4]=""" ### """

V={}

V[0]=""" # # """
V[1]=""" # # """
V[2]=""" # # """
V[3]=""" # # """
V[4]=""" # """

W={}

W[0]=""" # # """
W[1]=""" # # """
W[2]=""" ### """
W[3]=""" ### """
W[4]=""" # # """

X={}

X[0]=""" # # """
X[1]=""" # # """
X[2]=""" # """
X[3]=""" # # """
X[4]=""" # # """

Y={}

Y[0]=""" # # """
Y[1]=""" # # """
Y[2]=""" # """
Y[3]=""" # """
Y[4]=""" # """

Z={}

Z[0]=""" ### """
Z[1]=""" # """
Z[2]=""" # """
Z[3]=""" # """
Z[4]=""" ### """

#def in_word(word):
# word=word.upper() # this makes it so that any variable "word" is all in caps, so as to not screw up output.
# for ranges in range(0,5):
# print (letter[ranges])

#in_word("whatisthat")

print (H[0],I[0])
print (H[1], I[1])
print (H[2], I[2])
print (H[3], I[3])
print (H[4], I[4])

# # ###
# # #
### #
# # #
# # ###

I would love if my current code does not stray to far from what i have. I know there are codes on activate state that do this, but this is an assignemt, the idea is too look for help not copy verbatim from another user. So anyways, i think this is rather straight forward. I'm attempting to do/use columns as a way to set the text to go horizontal. I'm gonna just see what you guys think.


See More: Attempting to make banners in python.

Report •

#1
March 10, 2013 at 10:23:26
I'm not a Python guy, but I'd make a dictionary of lists. Then I could do something like:
for line in range(0,3): 
  for c in "some string":
    print(letters[c][line])

How To Ask Questions The Smart Way


Report •
Related Solutions


Ask Question