title: def function syntax error in Python 3
body: <p>I'm in the process of teaching myself to code and am currently working on a dice roller as a learning project. I'm runnng into a bit of an odd snag at the moment the moment. The fourth 'def' in my code, no matter what it actually is (I've tried with several that all work individually) it keeps getting flagged as a syntax error. Here's what I have:</p>
  
  <pre><code>import random
  
  def mult():
      print('How many dice would you like to roll?')
      multiplier = input()
      mod()
  
  def mod():
      print('What modifier, if any, would you like to assign?')
      modifier = input()
      result()
  
  def result():
      total = (roll * multiplier) + modifier
      print('Your result is' 
      (str(total)
  
  def menuscreen(): 
      print("Welcome to Jack's dice roller. What kind of die would you like to roll?")
      print("")
      print("A. d2")
      print("B. d4")
      print("C. d6")
      print("D. d8")
      print("E. d10")
      print("F. d12")
      print("G. d20")
      print("H. d100")
  
  def gen():
  
      menuscreen()
  
      if input() == 'a' or 'A':
          roll = random.randint(1,2)
          mult()
  
      if input() == 'b' or 'B':
          roll = random.randint(1,4)
          mult()
  
      if input() == 'c' or 'C':
          roll = random.randint(1,6)
          mult()
  
      if input() == 'd' or 'D':
          roll = random.randint(1,8)
          mult()
  
      if input() == 'e' or 'E':
          roll = random.randint(1,10)
          mult()
  
      if input() == 'f' or 'F':
          roll = random.randint(1,12)
          mult()
  
      if input() == 'g' or 'G':
          roll = random.randint(1,20)
          mult()
  
      if input() == 'h' or 'H':
          roll = random.randint(1,100)
          mult()
  
  def queryque():
  
      print('Would you care to roll again?')
  
      if input == 'yes':
          gen()
  
      if input == 'no':
          end
  
  gen()
  </code></pre>