[Tutor] python question

2008-11-21 Thread Daniel J Kramer
Hi

I have just joined this list. I need some help working on a Python
application I am working on.  I am working on a quiz game where the users
gain points when the answer questions correctly.  I have written the
skeleton of the quiz with If, Elif and Else statements.  it runs perfectly.

I am very unclear on how to score points at the end of each round and how to
import images.

Can anyone help out here or have any ideas on the best way to execute this?
I have included a copy of the quiz so you can get an idea of what I am
trying to do

thank you so much and I look forward to hearing from you soon

-- 
Daniel J Kramer
Constant Fables
249 12th st #3
Brooklyn, NY 11215
(h) 347 223 4571
(m) 646 427 7430


test.py
Description: Binary data
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] python question

2008-11-25 Thread Daniel J Kramer
Hi Kent

got it!  Is it because Python must recognize the answer as lower case?
sorry if that might seem like a dumb question, but I am looking to
understand this program.

cheers
Daniel


On Tue, Nov 25, 2008 at 12:38 PM, Kent Johnson <[EMAIL PROTECTED]> wrote:

> On Tue, Nov 25, 2008 at 11:52 AM, Daniel J Kramer
> <[EMAIL PROTECTED]> wrote:
> > Hi Kent
> >
> > I have been playing with the ,lower command and am not having much luck.
>  It
> > seems like a simple task, but it is not working for me.  Here is the code
> >
> > def main():
> > score = 0
> > print"Welcome to the Music Quiz.  Today's game has 8 rounds for
> you.
> > There will be audio rounds, visual rounds and straight ahead qustions. We
> > will begin with the round Journey to the Centre of New York"
> > print
> > A11 = raw_input ("We see the Ramones on the Bowery with rolled up
> > towels under their arms chewing out a rhythm on their bubble gum.  Where
> are
> > they planning to hitch a ride? ")
> > A11 = A11.lower()
>
> A11 now contains all lowercase characters.
>
> >   if A11 == "Rockaway Beach" :
> try
>  if A11 == "rockaway beach":
>
> Kent
>
> PS Please use Reply All to reply to the list.
>
> > score += 5
> >  print "Correct"
> >  elif A11 == "CBGB" :
> >print "That's where they are, not where they are
> going"
> > else:
> >print "Wrong, they all hitched a ride to Rockaway Beach"
> >
> > print "Your total score ", score
> >
> > main()
> >
> > Is the placement of the .lower function in the wrong place?  When I run
> the
> > code, the program does not recognize my input and will not give me a
> score.
> > This happens even if I enter text with capitals.  When I remove the
> .lower
> > function Python recognizes my answer, but only if it has capitals.
> >
> > any suggestions?
> >
> > cheers
> > Daniel
> >
> >
>



-- 
Daniel J Kramer
Constant Fables
249 12th st #3
Brooklyn, NY 11215
(h) 347 223 4571
(m) 646 427 7430
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


[Tutor] importing images and sound

2008-12-02 Thread Daniel J Kramer
Hi

I am writing a program based around a pub quiz.  I have been able to write
the program so it runs through a series of questions and gives users a score
at the end.

I need to import a specific font, images and sound.  Does anyone know a good
place to look for tutorials for this?  At the moment, I do not know where to
begin

thank you

-- 
Daniel J Kramer
Constant Fables
249 12th st #3
Brooklyn, NY 11215
(h) 347 223 4571
(m) 646 427 7430
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor