Q:

Rectangle of crosses (matrix)

This exercise is about asking to the user for 2 numbers, that will represent the width and high of the rectangle, the shell will return the edges with asterisks and the center of the matrix only with crosses. 
(There are spaces between asterisks and crosses)
import sys
width = int(input('Enter the width of the rectangle: '))
high = int(input('Enter the high of the rectangle: '))
matrix = []

if width < 0 or high < 0:
    print('INVALID DIMENSIONS')
    sys.exit()

else:
    for a in range(high):
        matrix.append([])

        for b in range(width):
            matrix[a].append(high)

print(matrix)

After that, I don't know how to put the asterisks on the edge and the crosses in the center.

A:

Do you mean something like this?
import sys
#width = int(input('Enter the width of the rectangle: '))
#high = int(input('Enter the high of the rectangle: '))

# Hardcoded for testing.
width = 7
height = 5

if width < 2 or height < 2:
    print('INVALID DIMENSIONS')
    sys.exit()

matrix = []

matrix.append('*' * (2*width - 1))
for _ in range(height):
    row = '*' + ''.join('+' for _ in range(width-2)) + '*'
    matrix.append(' '.join(row))
matrix.append('*' * (2*width - 1))

# Print matrix.
for row in matrix:
    print(row)

Output:
*************
* + + + + + *
* + + + + + *
* + + + + + *
* + + + + + *
* + + + + + *
*************

