I have done code and need help to get an out put like …

print a diamond like this, with different interior.

*-*

*—*

*-----*

*—*

*-*

*

code I have completed:

n = int(input(“You have entered a number: “))

if (n % 2 != 0):

print(”{0} is an odd number”.format(n))

print(“your value accepted”)

else:

print(“you have entered even number, please pass only odd numbers”)

exit();

for i in range (n):

for j in range(i + 1):

print("*", end=’ ')
print("\r")
for i in range (n, 0, -1):
for j in range(0, i -1):
print("*", end=’ ')

print("\r")

exit();

I am not sure how to change values in between first and last star of my out put. please help