Create a function above main() called make_milkshake(). Use  to design a milkshake!
Locate the first choice·=·sprite.ask("...")¬ in main() and edit it to offer milkshakes as an option.
From  , add elif above the else in main() that checks if choice == "milkshake".
Finally, call make_milkshake() inside the elif. Now try ordering a milkshake!



########################################################################
#        HELPER FUNCTIONS                                              #
########################################################################

def make_cone():
    """ Makes a cone for ice cream """
    cone_shape = codesters.TriangleIso(100,-100, 100, 200, "tan")
    cone_shape.set_rotation(180)

def make_dish():
    """ Makes a dish for an ice cream sundae """
    dish = codesters.Quad(10,0,190,0,160,-75,40,-75,"white","red")
    dish_text = codesters.Text("ED's\nICE CREAM\nSHOPPE",100,-40,"red")
    dish_text.set_size(.75)

def return_flavor_dictionary():
    """ Returns dictionary linking flavors to colors """
    flavor_to_color = {
        "vanilla": "ivory",
        "chocolate": "sienna",
        "strawberry": "lightcoral"
        }
    return flavor_to_color
    
def add_cone_scoops(scoops,flavor):
    """ Adds scoops of ice cream to a cone """
    y = 25
    flavor_to_color = return_flavor_dictionary()
    for counter in range(scoops):
        scoop_shape = codesters.Circle(100,y,100,flavor_to_color[flavor])
        y += 75
    make_cone()

def add_sundae_scoops(scoops, flavor):
    """ Adds scoops of ice cream to a dish """
    flavor_to_color = return_flavor_dictionary()
    if scoops == 1:
        scoop1 = codesters.Circle(100,10,75,flavor_to_color[flavor])
    elif scoops == 2:
        scoop1 = codesters.Circle(70,10,75,flavor_to_color[flavor])
        scoop2 = codesters.Circle(130,10,75,flavor_to_color[flavor])
    elif scoops == 3:
        scoop1 = codesters.Circle(70,10,75,flavor_to_color[flavor])
        scoop2 = codesters.Circle(130,10,75,flavor_to_color[flavor])
        scoop3 = codesters.Circle(100,50,75,flavor_to_color[flavor])
    make_dish()

def add_sprinkles(sprinkle_type, scoops):
    """ Adds sprinkles to ice cream in a cone """
    for counter in range(25*scoops):
        x = random.randint(55,145)
        y = random.randint(-15, 65 + 75*(scoops-1))
        rotation = random.randint(0,360)
        if sprinkle_type == "rainbow":
            rainbow = ["red","orange","yellow","green","blue","indigo","violet"]
            color = random.choice(rainbow)
        else:
            color = "saddlebrown"
        sprinkle = codesters.Rectangle(x,y,5,10,color)
        sprinkle.set_rotation(rotation)
    make_cone()

def add_fudge(scoops):
    """ Adds hot fudge to a sundae """
    if scoops == 3:
        scoop_y = 50
    else:
        scoop_y = 0 
    fudge1 = codesters.Ellipse(100, scoop_y-10, 15, 85, "saddlebrown")
    fudge2 = codesters.Ellipse(70, scoop_y-10, 15, 100, "saddlebrown")
    fudge2.set_rotation(-30)
    fudge3 = codesters.Ellipse(130, scoop_y-10, 15, 100, "saddlebrown")
    fudge3.set_rotation(30)
    make_dish()

def add_cherry(scoops):
    """ Adds a cherry to the top of a sundae """
    if scoops == 3:
        scoop_y = 50
    else:
        scoop_y = 0 
    cherry = codesters.Circle(100, scoop_y +40, 30, "red")
    cherry_x = cherry.get_x()
    cherry_y = cherry.get_y()
    stem = codesters.Curve(cherry_x, cherry_y, cherry_x-10, cherry_y+20, cherry_x-10, cherry_y+20, cherry_x, cherry_y+50, None, "red")
    make_dish()

########################################################################
#        MAIN FUNCTION                                                 #
########################################################################

def main():
    """ Sets up the program and calls other functions """
    
    stage.set_background_color("thistle")
    
    sprite = codesters.Sprite("person16", -100, 0)
    choice = sprite.ask("Would you like a cone or a sundae?")
    flavor = sprite.ask("Would you like vanilla, chocolate, or strawberry ice cream?")
    
    while True:
        print("Infinite loop!")
        stage.wait(1)
        try:
            scoops = int(sprite.ask("How many scoops would you like?"))
            if scoops >= 4:
                scoops = 3
            elif scoops <= 0:
                scoops = 1
            break
        except:
            sprite.say("Enter a number!")
    
    if choice == "cone":
        make_cone()
        add_cone_scoops(scoops, flavor)
        sprinkles = sprite.ask("Would you like rainbow or chocolate sprinkles? Enter nothing for none.")
        if sprinkles != "":
            # add your code here
            add_sprinkles(sprinkles, scoops)
            
    elif choice == "sundae":
        make_dish()
        add_sundae_scoops(scoops, flavor)
        fudge = sprite.ask("Would you like hot fudge on your sundae?")
        
        if fudge == "yes":
            add_fudge(scoops)
        
        cherry = sprite.ask("Would you like a cherry on top?")
        
        if cherry == "yes":
            add_cherry(scoops)
        
    else:
        sprite.say("Oops, that's not an option!")

main()