> 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
w to create
the counting variable that Greg suggested. Can someone lead me but don't
tell me the answer? Thanks!
>From: Danny Yoo <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>CC: Joseph Quigley <[EMAIL PROTECTED]>, Tutor
>Subject: Re: [Tutor] My First Program
&
> > Hi! My first "ever" program that I've created is a simple game called
> > "State Capitals". It's straight forward; 5 simple questions about
> > state capitals in a non-GUI format.
[some code cut]
Hi Trent,
Looks good so far! There is one direct thing we can do to make the
program a little
Hi! My first "ever" program that I've created is a simple game called "State
Capitals". It's straight forward; 5 simple questions about state capitals ina non-GUI format. Can someone look over my code and offer tips, suggestions,criticism? Also, I'd like to be able to end the program if the user mi
You should create a counting variable. Whenever the user answers incorrectly,
increment that variable by one. Starting with the fourth question and any
question after, you should check the value of the variable to see if it is
three or greater. If it is, then exit, if not, then continue. Check o
looks good for your 1st program. some improvements that i can think of:
1. notice how you repeat blocks of code? specifically, i mean: (ask a
question, get the answer, validate the answer). since this is all
similar code, it's a great place for you to learn what a loop is.
that way, you only h