title: Create function with sqlite OperationalError: no such column
body: <p>I want to create a function which I could input the genre of movies and the number of top rows I want to see.</p>
  
  <p>I have already built the database with sqlite. But I don't know how to use the function input in sqlite.</p>
  
  <p>My code:</p>
  
  <pre><code>
  def get_top_genre_actors(genre, k):
  
      c.execute('''SELECT ma.actor, m.rating FROM movie_actor ma
      LEFT JOIN movie m ON ma.imdb_id = m.imdb_id
      ORDER BY m.rating DESC, ma.actor
      LIMIT int(k)
      ''') 
      conn.commit()
      get_top = c.fetchall()
  
      print("Top 10 actors who played in highest rated ", genre, " movies:")
      print("Actor, Average ", genre, " movie rating")
      for x in get_top:
          print(x[0],', ', x[1],sep="")
  
  get_top_genre_actors("Drama", 5)
  </code></pre>
  
  <p>The result I got:</p>
  
  <blockquote>
    <p>OperationalError: no such column: k</p>
  </blockquote>
  
  <p>I know the wrong line is</p>
  
  <pre><code>LIMIT int(k)
  </code></pre>
  
  <p>How to make it right?</p>