original_docstring: Adds a new question to the dataFile when there is no questions
docstring: Adds a new question to the dataFile when there is no questions
docstring_tokens: Adds a new question to the dataFile when there is no questions
code: def add(self, event=None):
          '''Adds a new question to the dataFile when there is no questions'''
  
          question = self.scrolledtext.get(0.0,'end-1c')
          answer = self.ansentry.get()
          category = self.category.get()
  
          if answer == '' or question == '' or category == '' or answer == 'Answer... Egypt' or question == 'Question... Where do cats originate from?' or category == 'Category Name':
              messagebox.showinfo(message='Make sure all entries aren\'t empty or have the default text inside them')
              return
  
          c.execute('INSERT INTO subjects VALUES (?, ?)', (category, '#ff0000'))
          c.execute('INSERT INTO questions VALUES (?, ?, ?)', (category, answer, question))
          conn.commit()
  
          GetQuestions()
          self.window.destroy()
          Start()
code_tokens: def add ( self , event = None ) : question = self . scrolledtext . get ( 0.0 , 'end-1c' ) answer = self . ansentry . get ( ) category = self . category . get ( ) if answer == '' or question == '' or category == '' or answer == 'Answer... Egypt' or question == 'Question... Where do cats originate from?' or category == 'Category Name' : messagebox . showinfo ( message = 'Make sure all entries aren\'t empty or have the default text inside them' ) return c . execute ( 'INSERT INTO subjects VALUES (?, ?)' , ( category , '#ff0000' ) ) c . execute ( 'INSERT INTO questions VALUES (?, ?, ?)' , ( category , answer , question ) ) conn . commit ( ) GetQuestions ( ) self . window . destroy ( ) Start ( )
short_docstring: Adds a new question to the dataFile when there is no questions
short_docstring_tokens: Adds a new question to the dataFile when there is no questions
comment: '''Adds a new question to the dataFile when there is no questions'''