migrate to git.charlotte.sh

This commit is contained in:
Charlotte Croce 2025-04-19 23:42:08 -04:00
commit fbd588721e
412 changed files with 13750 additions and 0 deletions

View file

@ -0,0 +1,13 @@
def area_code(phone_number):
""" Given a phone number in the format: 802-555-1212
extract the first 3 characters and return this as a string
:param phone_number: (str) Must be formatted "XXX-XXX-XXXX"
:return: (str) 3 digit area_code
"""
return phone_number[:3]
# Leave this part for easily testing your function
print('"802-555-1212" area_code returns', area_code("802-555-1212"))
print('"410-617-3452" area_code returns', area_code("410-617-3452"))