title: I want to make basic real estate script with python
body: <p>Firstly I want to create real estate script so it should have menu. Firstly it'll ask what you want to do in the script. </p>
  
  <p>I created this menu:</p>
  
  <pre><code>menu = 0
  
  while menu != 6:
      try:
          answer = str(menu)
  
          menu = int(input(To buy house press 1\n To sell house press 2  , \n To list your house press 3,  \n for exit press 4 " "\n"))
      except(SyntaxError,NameError):
          print ("Enter correct numbers")
  </code></pre>
  
  <p>I know it's very simple and I need some ideas to improve it. Then I want to create first menu but I am stuck on how to use database correctly. I want to show you second menu because it's more important to me.</p>
  
  <p>Second menu:</p>
  
  <pre><code>  if menu == 2:
      cursor=connectdb.cursor()
  
      def create table():
          cursor.execute(
          CREATE TABLE newhouse(
          m_square INTEGER NOT NULL,
          room_number INTEGER NOT NULL ,
          place INTEGER NOT NULL,
          house_cost INTEGER NOT NULL
          )
          );
          con.close()
  
          m2 = input ('How many square meters is your home?  ' "\n" )
          room = input ('Enter the number of rooms of your home ' "\n" )
          floor = input ('On which floor is your house? ' "\n")
          price = input ('Enter the sales price of your home  '  )
  </code></pre>
  
  <p>The idea is to get data from user and write from database but I am really stuck here and I'm a beginner. If I pass this part, I'll try the other parts.</p>
  
  <p>Thanks for reading and helping to me :)</p>