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
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
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
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
> 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
"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:
>
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
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 '*
> 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
> 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
> 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
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
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 students initials on it formed out of # ch
13 matches
Mail list logo