Respuesta :

fichoh

The required code written in python 3 which displays the Area code number is :

user_input = str(input('Enter your number :'))

#accepts input from the user

split_on_hypen = user_input.split('-')

#split the values using the hyphens which seperates each set of digits

area_code = split_on_hypen[0]

#first index digits in the splitted values is the area code, this corresponds to the 0th index

print('Area code: %s' %area_code)

#display the Area code value assigned to the string, Area code using string formatting

Learn more :https://brainly.com/question/14786286

ACCESS MORE