Josip wrote: >>Write a Python program that spells out >>your name or nickname using special characters.
I just played about this exercise and it has to be about spelling and not about hardcoding, as It is more interestig to join banner characters into the same line. DotMap = { 'P' : ('PPP ','P P ','PPP ','P ','P '), 'Y' : ('Y Y ',' Y Y ',' Y ',' Y ',' Y '), 'T' : ('TTTTT ',' T ',' T ',' T ',' T '), 'H' : ('H H ','H H ','HHHHH ','H H ','H H '), 'O' : (' OOO ','O O ','O O ','O O ',' OOO '), 'N' : ('N N ','NN N ','N N N ','N NN ','N N '), ' ' : (' ',' ',' ',' ',' ',) } DotLineNum = 5 def PrintBanner(Banner): for i in range(DotLineNum): for Char in Banner: print DotMap[Char][i], print '' def MakeBanner(Banner): return '\n'.join([ ' '.join([ DotMap[c][i] # Horizontal segment of char for c in Banner ]) # Connected as line for i in range(DotLineNum) ]) # Connected as string print '' ShowBanner('PYTHON') print '' print MakeBanner('HY PYTHON') Janos Juhasz Érje el az álláskeresőket munkaidőben! http://allas.origo.hu _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor