Drawing stars around the center of the screen
It would be user friendly and make testing easier if the program accepted the input number as a command line argument too, for example:

import sys


def main():
    if sys.argv[1:]:
        num = int(sys.argv[1])
        if not is_valid_number(num):
            warn_invalid_number()
            sys.exit(1)
    else:
        num = prompt_valid_number()

    draw_stars_in_a_spiral(num)

if __name__ == '__main__':
    main()


While doing this, to avoid code duplication, I split the original functionality to multiple functions, which is a good practice in general anyway.

For validating the number, the N &lt; var &lt; M operator of Python is very handy:

def is_valid_number(num):
    return 1 &lt; num &lt; 20


Then the warning and prompting functions:

def warn_invalid_number():
    print("Number must between 2 to 19 (inclusive)")    


def prompt_number():
    return int(input("Enter a number: "))


When prompting the user until he gives a valid number, change to a while True loop to avoid the duplication when asking for a number:

def prompt_valid_number():
    while True:
        num = prompt_number()
        if is_valid_number(num):
            return num
        warn_invalid_number()


Finally, the main method to draw the stars:

def draw_stars_in_a_spiral(num):
    window = turtle.Screen()
    window.screensize(1200, 1200)

    draw = turtle.Turtle()
    draw.pensize(2)

    draw.speed('fastest')

    for _ in range(num):
        for angle in angles:
            draw.left(angle)
            draw.forward(180)
        draw.penup()
        draw.forward(60)
        draw.pendown()
        draw.left(170)


Some points to note:


I moved all the drawing operations here. If validation fails when invoking with command line parameters, there's no need to open a window and draw anything.
I replaced the unused shape variable in for shape in range(num) with _
I replaced the angle array with angles to be more intuitive, and the loop variable i with the more intuitive name angle