input: Write a function to generate a Python script that competes in a Kaggle competition by loading necessary libraries, reading data, splitting it into training and testing sets, defining a model, fitting the model, making predictions, and scoring the predictions. If no model is defined, return "No model defined". If the model is defined, return the accuracy score of the predictions.
  assert compete_in_kaggle()==No model defined
  assert compete_in_kaggle()==0.85
output: def compete_in_kaggle():
      try:
          import pandas as pd
          from sklearn.model_selection import train_test_split
          from sklearn.ensemble import RandomForestClassifier
          from sklearn.metrics import accuracy_score
          
          data = pd.read_csv('data.csv')
          X = data.drop('target', axis=1)
          y = data['target']
          X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
          
          model = RandomForestClassifier()
          model.fit(X_train, y_train)
          
          predictions = model.predict(X_test)
          score = accuracy_score(y_test, predictions)
          return score
      except NameError:
          return "No model defined"