> def quiz_question(some_question, some_right_answer):
> question = raw_input(some_question)
> if question == some_right_answer:
> print "Yes!\n"
> else:
> print "Wrong\n"
>
> quiz_question("Name the capital of NC? ", "Raleigh")
> quiz_question("Name t
Here's my new and improved program:
def quiz_question(some_question, some_right_answer):
question = raw_input(some_question)
if question == some_right_answer:
print "Yes!\n"
else:
print "Wrong\n"
quiz_question("Name the capital of NC? ", "Ra
> like in Java, i would like to have live currency quotes fed to my
> function,
Look at the urllib module.
However I suspect you might be better working on the basics for a little
longer before getting too ambitious!
def rupees_from_dollars(d_doll):
return 43*(d_doll)
You don;t need the ()
> is there a way to get rid of '\n' and '\t' characters
> from xml files easily.
You can read the entire file as a string then apply standard
string replace functionality to substitute an empty string..
HTH,
Alan G
Author of the learn to program web tutor
http://www.freenetpages.co.uk/hp/alan.
> On Fri, 9 Dec 2005, vikas mohan wrote:
>
> > Thanks! Looks in a better shape now! I have a diffrent question now:
> > What if like in Java, i would like to have live currency quotes fed to
> > my function, from some forex dealer website? So, that my program can
> > provide uptodate info. How ca
Srinivas Iyyer wrote:
> Hi group,
> I just have another question in parsin XML files. I
> found it very easy to parse XML files with kent and
> danny's help.
>
> I realized that all my XML files have '\t' and '\n'
> and whitespace. these extra features are making to
> extract the text data fro
Hi group,
I just have another question in parsin XML files. I
found it very easy to parse XML files with kent and
danny's help.
I realized that all my XML files have '\t' and '\n'
and whitespace. these extra features are making to
extract the text data from the xml files very
difficult. I can
On Fri, 9 Dec 2005, vikas mohan wrote:
> Thanks! Looks in a better shape now! I have a diffrent question now:
> What if like in Java, i would like to have live currency quotes fed to
> my function, from some forex dealer website? So, that my program can
> provide uptodate info. How can I hot/liv
Thanks! Looks in a better shape now! I have a diffrent question now: What if like in Java, i would like to have live currency quotes fed to my function, from some forex dealer website? So, that my program can provide uptodate info. How can I hot/live link my function?
/VikasM
#converts currenc
Hi all, this is my first program in python.
It's a currency converter mini-program, but I am not getting the desired output. What wrong am I doing here?
Program code:
#converts currencies to Indian rupees
def print_options(): print "Options:" print " 'p' print options" print " 'c' c
Hi!
vikas mohan wrote:
> Hi all, this is my first program in python.
>
> It's a currency converter mini-program, but I am not getting the desired
> output. What wrong am I doing here?
>
> *Program code:*
>
> #converts currencies to Indian rupees
>
> def print_options():
> print "Options
Hi,
I intend to use an XSLT processor, and found various modules (4suite, Sab-Pyth)
on the web. Could anyone recommend a specific module for transforming XML files?
Thanks,
Jan
--
It's overkill, of course. But you can never have too much overkill.
__
12 matches
Mail list logo