Create a Python program that uses the TensorFlow library to train a neural network on the MNIST dataset for handwritten digit recognition. Evaluate the model's performance and display its accuracy, precision, recall, and F1-score.
To create a Python program that uses TensorFlow to train a neural network on the MNIST dataset for handwritten digit recognition, you can follow these steps:

1. Install the required libraries:
```bash
pip install tensorflow numpy sklearn
```

2. Create a file named `mnist_nn.py` and add the following code:

```python
import tensorflow as tf
from tensorflow.keras.datasets import mnist
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Dense, Flatten
from sklearn.metrics import accuracy_score, precision_score, recall_score, f1_score

# Load the MNIST dataset
(x_train, y_train), (x_test, y_test) = mnist.load_data()

# Normalize the data
x_train, x_test = x_train / 255.0, x_test / 255.0

# Define the model architecture
model = Sequential([
    Flatten(input_shape=(28, 28)),
    Dense(128, activation='relu'),
    Dense(10, activation='softmax')
])

# Compile the model
model.compile(optimizer='adam',
              loss='sparse_categorical_crossentropy',
              metrics=['accuracy'])

# Train the model
model.fit(x_train, y_train, epochs=5)

# Evaluate the model's performance
y_pred = model.predict_classes(x_test)
acc = accuracy_score(y_test, y_pred)
precision = precision_score(y_test, y_pred, average='weighted')
recall = recall_score(y_test, y_pred, average='weighted')
f1 = f1_score(y_test, y_pred, average='weighted')

print(f"Accuracy: {acc:.4f}")
print(f"Precision: {precision:.4f}")
print(f"Recall: {recall:.4f}")
print(f"F1-score: {f1:.4f}")
```

3. Run the script using the command:
```bash
python mnist_nn.py
```

This will train a simple neural network on the MNIST dataset and display its accuracy, precision, recall, and F1-score. Note that this is just a basic example; you can improve the model's performance by experimenting with different architectures, hyperparameters, and training strategies.