Advertisement
Guest User

Untitled

a guest
Sep 4th, 2015
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.57 KB | None | 0 0
  1. height = int(input('Height: '))
  2. width = int(input('Width: '))
  3. text = str(input('Text: '))
  4.  
  5. lines = []
  6. for line in open('font.txt'):
  7.   lines.append(line.rstrip())
  8. space = []
  9. for h in range(height):
  10.   space.append(' '*width)
  11. letters = {' ': space}
  12. for o in range(ord('a'), ord('z')+1):
  13.   d = o - 97
  14.   l = chr(o)
  15.   letters[l] = []
  16.   for h in range(height):
  17.     letters[l].append(lines[h + (d * height)])
  18. for h in range(height):
  19.   string = ''
  20.   for w in text.lower():
  21.     string += letters[w][h]
  22.     string += (width - len(letters[w][h])) * ' '
  23.   print(string)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement