<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;"># campus.py

""" Example used in Lecture 6 """

def get_campus_num(phone_num):
    """Returns: the on-campus version of a 10-digit phone number.

    Returns a str of the last 5 digits in the form "X-XXXX"

    phone_num: phone number w/area code
    Precondition: phone_num is a 10 digit string of only numbers
    """
    return phone_num[5]+"-"+phone_num[6:10]
</pre></body></html>