Newbie needs help to find bug in his first Perl program

Emile van Sebille emile at fenx.com
Sun Mar 25 12:29:38 EST 2001


>>> print "%y" % 1
Traceback (innermost last):
  File "<pyshell#0>", line 1, in ?
    print "%y" % 1
ValueError: unsupported format character 'y' (0x79)
>>>

HTH,

--

Emile van Sebille
emile at fenx.com

---------
"Ron Stephens" <rdsteph at earthlink.net> wrote in message
news:3ABCC757.6C6F17CA at earthlink.net...
> Ok, I am a total newbie. I took some programming course in college, did
> some relatively simple programs in Fortran, Basic, PL/1 and even one in
> assembler for an old IBM "mainframe" using punched cards. But that was
> along time ago.
>
> OK, I have just fallen head over heels in love with Python. Wrote my
> first little "program", about 200 lines of a thing to do simple
> "Decision Analysis" in a general sort of way, to take input from an
> "expert" in any given (simple) field, and set up criteria based on the
> experts experience, then calculate a weighted average to decide which
> option to choose.
>
> I find the debugging to be extraordinarily good, but I have one bug I
> cant seem to figure out yet. Been up all night its noon of the next day
> ;-))) Need some sleep
>
> The offending line of code is
>
> sixtwo = raw_input ("where does %s rank for %y ?" % (option6,
> criteria2))
>
> Can anyone see what is wrong with this? I have several lines like this
> and they all give me error messages.
>
> Sorry for the trivial newbie nature of my question and first post ;-)))
>
> But I do luv Python....
>





More information about the Python-list mailing list