```python
import math

num_rows = int(input())
if num_rows % 2 != 0:
    upper_mid = math.ceil(num_rows/2)
    lower_mid = num_rows//2
    
    #prints upper normal triangle
    for row in range(0, upper_mid):                 
        for col in range(upper_mid-1, row, -1):     
            print(end=" ")                         
        for col in range(row+1):                  
            print('*', end="")
        for col in range(row):                   
            print('*', end="")
        print()
    
    # prints lower inverted triangle 
    for row in range(0, lower_mid):                
        for col in range(row+1):                    
            print(end=" ")
        for col in range(lower_mid - row):         
            print('*', end="")
        for col in range(lower_mid - row-1):    
            print('*', end="")
        print()
else:
    print("Only odd numbers!")
```
Input:
``` 
9
```

Ouput: 
```
    *
   ***
  *****
 *******
*********
 *******
  *****
   ***
    *
```

This code works 100%, and prints a diamond shape star pattern. I'm a beginner in Python, and wrote this by myself, so I might have written something unnecessary and the code could be simplified, or something else. Feedback is appreciated.