[Tutor] banners

2006-08-27 Thread Juhász János
I have continued to work on making banners:) Here is a solution with PIL (http://www.pythonware.com/products/pil/index.htm): import Image, ImageFont, ImageDraw ShowText = 'Hi all' font = ImageFont.load(r'c:\Python24\Lib\site- packages\enthought\kiva\pil_fonts\courier-bold-10.pil') size = font

Re: [Tutor] banners

2006-08-23 Thread John Fouhy
On 23/08/06, Juhász János <[EMAIL PROTECTED]> wrote: > 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. I had a brief think about that as well. I think if I tried to code it, my a

Re: [Tutor] banners

2006-08-23 Thread Bob Gailer
Consider: charmap = """ A BBBCCC etc... A A B B C C D D A A BBB C D D A B B C C D D A A BBBCCC """ Which lets you enter each letter the way you want it to look. No need to laboriously translate that by hand into tuples. Let the compute

[Tutor] banners

2006-08-23 Thread Juhász János
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

Re: [Tutor] banners

2006-08-20 Thread Danny Yoo
> i did it. Cool; I'm glad to see that you could do it. [code cut] Yes, it's mostly an exercise for you to get comfortable using multiple statements. Personally, I think your instructor should have made the first assignment something dealing with expressions rather than print statements, bu

Re: [Tutor] banners

2006-08-20 Thread Alan Gauld
"josip" <[EMAIL PROTECTED]> wrote >i did it. Well done! > for i in range(3): >print '*' * 5 + '\t *' >if i in range(0,1): range(0,1) is [0], so you could just do if i == 0: >print '*'+' ' *4 + '\t *' >if i in range(1,2): similarly range(1,2) is [1] so if i == 1: >

Re: [Tutor] banners

2006-08-20 Thread josip
i did it. for i in range(3):    print '*' * 5 + '\t  *'     if i in range(0,1):    print '*'+' ' *4 + '\t  *'    if i in range(1,2):    print ' ' * 4 + '*  *  *' is this code ok? someone have better solution? thx! Do you Yahoo!? Everyone is raving about the all-new Yahoo! Mail Be

Re: [Tutor] banners

2006-08-20 Thread josip
ok i get letter s and j, now i neetd them to be printed together for i in range(3):    print '*'*5    if i in range(0,1):        print '*'    if i in range(1,2):        print ' ' * 4 + '*'        ***    **for i in range(4):    print ' ' * 3 + '*'    if i in range(3,4):        print '* 

Re: [Tutor] banners

2006-08-18 Thread Alan Gauld
> It's simpler than that: the homework states that the message is > hardcoded to show either josip's name or nickname. Ah, OK, I hadn't noticed that. In that case yes it can be as simple as hello world. Alan G. ___ Tutor maillist - Tutor@python.org

Re: [Tutor] banners

2006-08-17 Thread Danny Yoo
> I'm not so sure Danny, figuring out how to draw the letters in the > banner is not obvious after having read a hello-world program example. > There are some tricky-ish aspects to this one. Hi Alan, It's simpler than that: the homework states that the message is hardcoded to show either josip

Re: [Tutor] banners

2006-08-17 Thread Alan Gauld
> As far as I can tell, you should be able to solve this problem after > reading the first section of any Python tutorial. I'm not so sure Danny, figuring out how to draw the letters in the banner is not obvious after having read a hello-world program example. There are some tricky-ish aspects to

Re: [Tutor] banners

2006-08-17 Thread Danny Yoo
On Thu, 17 Aug 2006, josip wrote: > Hi, I want to solve thi question, but I don't know how [homework question cut] This is homework; our policy is not to give much help on this, as it's your work to do. Do you have any specific questions? Otherwise, all I can do here is point you toward i

[Tutor] banners

2006-08-17 Thread josip
Hi, I want to solve thi question, but I don't know how Can someone help?   When dot matrix printers were at the height of hi- tech fashion, university students used to create banners with words on them using special characters (e.g. a banner with a student’s initials on it formed out of # ch