Answer:
n = int(input("Enter the n (positive odd integer): "))
for i in range(1, n+1, 2):
print(i*"*")
for i in range(n-2, 0, -2):
print(i*"*")
Explanation:
*The code is in Python.
Ask the user to enter the n
Create a for loop that iterates from 1 to n, incrementing by 2 in each iteration. Print the corresponding number of asterisks in each iteration
Create another for loop that iterates from n-2 to 1, decrementing by 2 in each iteration. Print the corresponding number of asterisks in each iteration