<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">"""
Module containing some postal helper functions

Author: Anne Bracy (awb93)
Date:   Feb 27, 2019
"""

def good_state(state):
    return type(state) == str and len(state) == 2 and state == "NY" # etc

def print_mailing_label(num, st, city, state, zip):
    """
    prints out the address in standard mailing label format
    
    Preconditions
    num: an int
    st: str representing the street name
    city: str the city name
    state: a 2-digit all-caps str representing the state
    zip: a 5 digit string
    """
    assert type(num) == int, "street number must be an int"
    assert type(st) == str, "street name must be a str"
    assert type(city) == str, "city must be a str"
    assert good_state(state), "state is ill-formatted"
    assert type(zip) == str, "zip code must be a str"

    print("Ship to:")
    print(str(num) + " " + st)
    print(city+", "+state+"  "+zip)
</pre></body></html>