title: Python Quiz Scoring and Conditional Statement Problems
body: <p>I've started learning Python at school for around a month now, and I have decided to make a quiz. I have added in a scoring system so if you were to answer a question incorrectly, it would tell you your score. However, this is not working and it always will give you a score of 0. Also, is there a way of only putting one else statement if they were to fail a question, instead of one for each question? Thanks :)</p>
  
  <p>Here's an example of the code(Python 3.2.3):</p>
  
  <pre><code>#QUIZ
  
  
  print("Welcome to the quiz")
  print("Please choose a difficulty:")
  difficulty = input("A) Hard   B)Easy")
  
  
  if difficulty == "A":
      score = 0
      print("")
  def question(score):
       print("You chose the hard difficulty")
       print("Where is the Great Victoria lake located?")
       answer1 = input("A) Canada   B)West Africa   C)Australia   D)North America")
       if answer1 == "C":
           print("Correct")
           score = score+1
       else:
           print("you failed the quiz")
           print("Score:",score)
           quit()
  
  
  
  
  
  def question2(score):
       print("Who is most responsible for cracking the Enigma Code")
       answer2 = input("A) Alan Turing   B) Jeff Bezos   C) George Boole   D) Charles   Babbage")
       if answer2 == "A":
           print("Correct")
           score = score+1
       else: 
           print("you failed the quiz")
           print("Score:",score)
           quit()
  
  
  
  
  def diff_easy(difficulty):
      if difficulty == "B":
          score2 = 0
          print("")
  
  
  def question4(score2):
          print("You chose the easy difficulty")
          print("What is the capital of Australia?")
          answer1 = input("A) Canberra   B) Sydney   C)Melbourne")
          if answer1 == "A":
              print("Correct")
              score2 = score2+1
   else:
           print("you failed the quiz")
           print("Score:",score2)
           quit()
  
  
  def question5(score2):
      print("When was the Great Fire of London?")
      answer2 = input("A) 1666   B) 1555   C)1605")
      if answer2 == "A":
           print("Correct")
           score2 = score2+1
  
      else:
           print("you failed the quiz")
           print("Score:",score2)
           quit()
  
  if difficulty == "A":
      question(score)
      question2(score)
  
  
  
  if difficulty == "B":
      diff_easy(difficulty)
      question4(score2)
      question5(score2)
  </code></pre>