input: Write a function to convert a SQL query into a Python program that establishes a connection to a database, executes the query, and prints the results. The function should take the SQL query as input and handle the necessary database connection and execution. If the connection details are not provided, the function should prompt the user to input them.
  
  def convert_sql_to_python(sql_query):
      import datetime, pyodbc
  
      # Prompt for connection details if not provided
      connection_details = input("Enter the connection details: ") if "<connection details>" in sql_query else "<connection details>"
      
      # Establish a connection to the database
      conn = pyodbc.connect(connection_details)
      cursor = conn.cursor()
      
      # Parse the SQL query to determine if it has a WHERE clause for YEAR(order_date)
      query_date = datetime.date.today().year
      where_clause = ""
      if "YEAR(order_date)" in sql_query:
          where_clause = f"WHERE YEAR(order_date) = {query_date}"
      
      # Execute the query
      cursor.execute(sql_query + " " + where_clause)
      results = cursor.fetchall()
      
      # Output the results
      for result in results:
          print(result)
  
  assert convert_sql_to_python("SELECT * FROM orders")==None
  assert convert_sql_to_python("SELECT * FROM orders WHERE YEAR(order_date) = 2020")==None
  assert convert_sql_to_python("SELECT * FROM orders WHERE YEAR(order_date) = 2021")==None
  assert convert_sql_to_python("")==None
  assert convert_sql_to_python(None)==None
output: def convert_sql_to_python(sql_query):
      import datetime, pyodbc
  
      # Prompt for connection details if not provided
      connection_details = input("Enter the connection details: ") if "<connection details>" in sql_query else "<connection details>"
      
      # Establish a connection to the database
      conn = pyodbc.connect(connection_details)
      cursor = conn.cursor()
      
      # Parse the SQL query to determine if it has a WHERE clause for YEAR(order_date)
      query_date = datetime.date.today().year
      where_clause = ""
      if "YEAR(order_date)" in sql_query:
          where_clause = f"WHERE YEAR(order_date) = {query_date}"
      
      # Execute the query
      cursor.execute(sql_query + " " + where_clause)
      results = cursor.fetchall()
      
      # Output the results
      for result in results:
          print(result)