original_docstring: Adds a new question to the dataFile
docstring: Adds a new question to the dataFile
docstring_tokens: Adds a new question to the dataFile
code: def newquestion(self, event=None):
          '''Adds a new question to the dataFile'''
          category = self.dropdown.get()
          question = self.scrolledtext.get(0.0,'end-1c')
          answer = self.ansentry.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 questions VALUES (?,?,?)', (category, answer, question))
          conn.commit()
          messagebox.showinfo(message='New Question created!')
  
          self.window.destroy()
          main.refreshlist()
code_tokens: def newquestion ( self , event = None ) : category = self . dropdown . get ( ) question = self . scrolledtext . get ( 0.0 , 'end-1c' ) answer = self . ansentry . 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 questions VALUES (?,?,?)' , ( category , answer , question ) ) conn . commit ( ) messagebox . showinfo ( message = 'New Question created!' ) self . window . destroy ( ) main . refreshlist ( )
short_docstring: Adds a new question to the dataFile
short_docstring_tokens: Adds a new question to the dataFile
comment: '''Adds a new question to the dataFile'''